Skip to content

Commit f28fcd5

Browse files
Debug workflows
1 parent ff95693 commit f28fcd5

2 files changed

Lines changed: 46 additions & 25 deletions

File tree

.github/workflows/Dev-Container-Publish.yaml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ on:
66
- dev
77

88
jobs:
9-
publish-dev:
9+
prepare:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
1313
packages: write
1414
attestations: write
1515
id-token: write
16-
16+
outputs:
17+
short_sha: ${{ steps.vars.outputs.short_sha }}
1718
steps:
1819
- name: Checkout code
1920
uses: actions/checkout@v4
@@ -30,12 +31,18 @@ jobs:
3031
id: vars
3132
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
3233

33-
- name: Call reusable Docker publish workflow
34-
uses: ./.github/workflows/reusable-docker-publish.yml
35-
with:
36-
image_name: ${{ github.repository }}
37-
tags: |
38-
ghcr.io/${{ github.repository }}:dev
39-
ghcr.io/${{ github.repository }}:dev-${{ steps.vars.outputs.short_sha }}
40-
secrets:
41-
token: ${{ secrets.GITHUB_TOKEN }}
34+
docker-publish:
35+
needs: prepare
36+
uses: ./.github/workflows/reusable-docker-publish.yml
37+
permissions:
38+
contents: write
39+
packages: write
40+
attestations: write
41+
id-token: write
42+
with:
43+
image_name: ${{ github.repository }}
44+
tags: |
45+
ghcr.io/${{ github.repository }}:dev
46+
ghcr.io/${{ github.repository }}:dev-${{ needs.prepare.outputs.short_sha }}
47+
secrets:
48+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Tag-and-Release.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ on:
88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11+
outputs:
12+
version: ${{ steps.get_tag.outputs.version }}
1113
permissions:
1214
contents: write
1315
packages: write
1416
attestations: write
1517
id-token: write
16-
1718
if: startsWith(github.event.pull_request.title, 'Release:') && github.event.pull_request.merged == true
1819
steps:
1920
- name: Checkout code
@@ -46,26 +47,39 @@ jobs:
4647
git push --follow-tags
4748
4849
- name: Create changelog diff
49-
id: changelog_diff
5050
run: |
5151
sed -n '/#### [${{ steps.get_tag.outputs.version }}]/,/^#### /p' CHANGELOG.md | sed '$d' > release_notes.md
5252
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
6277

6378
- name: Create release
64-
id: create_release
6579
uses: softprops/action-gh-release@v2
6680
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 }}
6983
body_path: ./release_notes.md
7084
draft: false
7185
prerelease: false

0 commit comments

Comments
 (0)