|
13 | 13 |
|
14 | 14 | jobs: |
15 | 15 | semantic-release: |
16 | | - if: "!startsWith(github.ref, 'refs/tags/') && contains(github.event.head_commit.message, 'hotfix:')" |
| 16 | + if: contains(github.event.head_commit.message, 'hotfix:') |
17 | 17 | permissions: |
18 | 18 | contents: write # to be able to publish a GitHub release |
19 | 19 | issues: write # to be able to comment on released issues |
|
40 | 40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
41 | 41 | run: npx semantic-release |
42 | 42 |
|
43 | | - docker-build: |
44 | | - if: startsWith(github.ref, 'refs/tags/') |
45 | | - runs-on: ubuntu-latest |
46 | | - needs: semantic-release |
47 | | - steps: |
48 | | - - name: Checkout repository |
49 | | - uses: actions/checkout@v4 |
50 | | - |
51 | | - - name: Set up QEMU |
52 | | - uses: docker/setup-qemu-action@v3 |
53 | | - |
54 | | - - name: Set up Docker Buildx |
55 | | - uses: docker/setup-buildx-action@v3 |
56 | | - |
57 | | - - name: Log in to Docker Hub |
58 | | - uses: docker/login-action@v3 |
59 | | - with: |
60 | | - username: ${{ secrets.DOCKER_USERNAME }} |
61 | | - password: ${{ secrets.DOCKER_PASSWORD }} |
62 | | - |
63 | | - - name: Extract version from tag |
64 | | - id: tag_version |
65 | | - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
66 | | - |
67 | | - - name: Build and push HOTFIX image |
68 | | - uses: docker/build-push-action@v2 |
69 | | - with: |
70 | | - context: . |
71 | | - file: ./Dockerfile |
72 | | - push: true |
73 | | - tags: | |
74 | | - ${{ env.IMAGE_NAME }}:${{ env.VERSION }} |
75 | | - platforms: linux/amd64,linux/arm64 |
76 | | - |
77 | 43 | cherry-pick: |
78 | | - if: contains(github.event.head_commit.message, 'hotfix:') && startsWith(github.ref, 'refs/heads/main') |
| 44 | + if: contains(github.event.head_commit.message, 'hotfix:') |
79 | 45 | runs-on: ubuntu-latest |
80 | 46 | needs: docker-build |
81 | 47 | permissions: |
|
0 commit comments