Skip to content

Commit c441ac3

Browse files
committed
Added new workflow
1 parent 0610ff0 commit c441ac3

1 file changed

Lines changed: 19 additions & 18 deletions

File tree

.github/workflows/docker-build-push.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ on:
88
required: true
99
default: 'latest'
1010
push:
11-
branches: [ main ]
12-
tags: [ 'v*' ]
11+
branches:
12+
- main
1313
paths:
14-
- 'hts_dagster_sample/**'
15-
- 'Dockerfile'
16-
- 'pyproject.toml'
17-
pull_request:
18-
branches: [ main ]
14+
- '**/*.py' # Any Python file changes
15+
- '**/*.toml' # Any TOML file changes
16+
- 'Dockerfile' # Dockerfile changes
17+
- '.github/workflows/*.yml' # Workflow file changes
18+
- 'requirements.txt' # If you have requirements.txt
19+
- 'README.md' # README changes
1920

2021
jobs:
2122
build:
@@ -37,7 +38,15 @@ jobs:
3738
username: ${{ secrets.DOCKER_USERNAME }}
3839
password: ${{ secrets.DOCKERHUB_TOKEN }}
3940

40-
# Step 4: Set image tag
41+
# Debug step to verify workflow triggering
42+
- name: Debug Info
43+
run: |
44+
echo "Event name: ${{ github.event_name }}"
45+
echo "Branch name: ${{ github.ref }}"
46+
echo "Commit message: ${{ github.event.head_commit.message }}"
47+
echo "Changed files:"
48+
git diff --name-only ${{ github.event.before }} ${{ github.event.after }}
49+
4150
- name: Set image tag
4251
run: |
4352
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
@@ -46,14 +55,6 @@ jobs:
4655
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
4756
fi
4857
49-
# Step 5: Display build info
50-
- name: Display build information
51-
run: |
52-
echo "Building image with tag: $IMAGE_TAG"
53-
echo "Context directory: ."
54-
echo "Dockerfile path: ./Dockerfile"
55-
56-
# Step 6: Build and push Docker image
5758
- name: Build and push Docker image
5859
uses: docker/build-push-action@v5
5960
with:
@@ -62,8 +63,8 @@ jobs:
6263
platforms: linux/amd64
6364
push: true
6465
tags: |
65-
${{ secrets.DOCKER_USERNAME }}/dagster-beta-usercode:${{ env.IMAGE_TAG }}
66-
${{ secrets.DOCKER_USERNAME }}/dagster-beta-usercode:latest
66+
${{ secrets.DOCKER_USERNAME }}/dagster-usercode:${{ env.IMAGE_TAG }}
67+
${{ secrets.DOCKER_USERNAME }}/dagster-usercode:latest
6768
6869
# Step 7: Update Kubernetes deployment (if needed)
6970
- name: Update Kubernetes deployment

0 commit comments

Comments
 (0)