|
8 | 8 | required: true |
9 | 9 | default: 'latest' |
10 | 10 | push: |
11 | | - branches: [ main ] |
12 | | - tags: [ 'v*' ] |
| 11 | + branches: |
| 12 | + - main |
13 | 13 | 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 |
19 | 20 |
|
20 | 21 | jobs: |
21 | 22 | build: |
|
37 | 38 | username: ${{ secrets.DOCKER_USERNAME }} |
38 | 39 | password: ${{ secrets.DOCKERHUB_TOKEN }} |
39 | 40 |
|
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 | +
|
41 | 50 | - name: Set image tag |
42 | 51 | run: | |
43 | 52 | if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then |
|
46 | 55 | echo "IMAGE_TAG=latest" >> $GITHUB_ENV |
47 | 56 | fi |
48 | 57 |
|
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 |
57 | 58 | - name: Build and push Docker image |
58 | 59 | uses: docker/build-push-action@v5 |
59 | 60 | with: |
|
62 | 63 | platforms: linux/amd64 |
63 | 64 | push: true |
64 | 65 | 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 |
67 | 68 |
|
68 | 69 | # Step 7: Update Kubernetes deployment (if needed) |
69 | 70 | - name: Update Kubernetes deployment |
|
0 commit comments