|
8 | 8 | jobs: |
9 | 9 | release: |
10 | 10 | runs-on: ubuntu-latest |
| 11 | + outputs: |
| 12 | + version: ${{ steps.get_tag.outputs.version }} |
11 | 13 | permissions: |
12 | 14 | contents: write |
13 | 15 | packages: write |
14 | 16 | attestations: write |
15 | 17 | id-token: write |
16 | | - |
17 | 18 | if: startsWith(github.event.pull_request.title, 'Release:') && github.event.pull_request.merged == true |
18 | 19 | steps: |
19 | 20 | - name: Checkout code |
@@ -46,26 +47,39 @@ jobs: |
46 | 47 | git push --follow-tags |
47 | 48 |
|
48 | 49 | - name: Create changelog diff |
49 | | - id: changelog_diff |
50 | 50 | run: | |
51 | 51 | sed -n '/#### [${{ steps.get_tag.outputs.version }}]/,/^#### /p' CHANGELOG.md | sed '$d' > release_notes.md |
52 | 52 |
|
53 | | - - name: Call reusable Docker publish workflow |
54 | | - uses: ./.github/workflows/reusable-docker-publish.yml |
55 | | - with: |
56 | | - image_name: ${{ github.repository }} |
57 | | - tags: | |
58 | | - ghcr.io/${{ github.repository }}:${{ steps.get_tag.outputs.version }} |
59 | | - ghcr.io/${{ github.repository }}:latest |
60 | | - secrets: |
61 | | - token: ${{ secrets.GITHUB_TOKEN }} |
| 53 | + docker-publish: |
| 54 | + needs: release |
| 55 | + uses: ./.github/workflows/reusable-docker-publish.yml |
| 56 | + permissions: |
| 57 | + contents: write |
| 58 | + packages: write |
| 59 | + attestations: write |
| 60 | + id-token: write |
| 61 | + with: |
| 62 | + image_name: ${{ github.repository }} |
| 63 | + tags: | |
| 64 | + ghcr.io/${{ github.repository }}:${{ needs.release.outputs.version }} |
| 65 | + ghcr.io/${{ github.repository }}:latest |
| 66 | + secrets: |
| 67 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 68 | + |
| 69 | + create-release: |
| 70 | + needs: [release, docker-publish] |
| 71 | + runs-on: ubuntu-latest |
| 72 | + permissions: |
| 73 | + contents: write |
| 74 | + steps: |
| 75 | + - name: Checkout code |
| 76 | + uses: actions/checkout@v4 |
62 | 77 |
|
63 | 78 | - name: Create release |
64 | | - id: create_release |
65 | 79 | uses: softprops/action-gh-release@v2 |
66 | 80 | with: |
67 | | - tag_name: ${{ steps.get_tag.outputs.version }} |
68 | | - name: Release ${{ steps.get_tag.outputs.version }} |
| 81 | + tag_name: ${{ needs.release.outputs.version }} |
| 82 | + name: Release ${{ needs.release.outputs.version }} |
69 | 83 | body_path: ./release_notes.md |
70 | 84 | draft: false |
71 | 85 | prerelease: false |
|
0 commit comments