Skip to content

Commit a9db82f

Browse files
chore(deps)(deps): Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
1 parent 1d57607 commit a9db82f

File tree

6 files changed

+352
-352
lines changed

6 files changed

+352
-352
lines changed
Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
1-
name: Canary Release
2-
3-
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
6-
branches: [main, next]
7-
8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
packages: write
12-
13-
env:
14-
DOTNET_VERSION: "10.0.*"
15-
16-
concurrency:
17-
group: canary-${{ github.event.pull_request.number }}
18-
cancel-in-progress: true
19-
20-
jobs:
21-
canary:
22-
name: Create Canary Release
23-
runs-on: ubuntu-latest
24-
if: github.event_name == 'pull_request' && (github.event.head_commit == null || (!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')))
25-
outputs:
26-
canary-version: ${{ steps.canary.outputs.newVersion }}
27-
published: ${{ steps.canary.outputs.published }}
28-
steps:
29-
- name: Generate GitHub App Token
30-
id: generate-token
31-
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v2.0.0
32-
with:
33-
app-id: ${{ vars.AUTO_RELEASE_APP_ID }}
34-
private-key: ${{ secrets.AUTO_RELEASE_APP_PRIVATE_KEY }}
35-
36-
- name: Checkout
37-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38-
with:
39-
fetch-depth: 0
40-
token: ${{ steps.generate-token.outputs.token }}
41-
42-
- name: Setup Auto
43-
uses: auto-it/setup-auto@8088350955c4009f66570db1f401fa1e0adb5a38 # v2.0.0
44-
45-
- name: Create Canary Release
46-
id: canary
47-
run: |
48-
auto canary --pr ${{ github.event.pull_request.number }} --quiet > /tmp/canary-output.txt || echo "published=false" >> $GITHUB_OUTPUT
49-
50-
if grep -q "Published" /tmp/canary-output.txt; then
51-
echo "published=true" >> $GITHUB_OUTPUT
52-
VERSION=$(cat /tmp/canary-output.txt | grep -oP 'v\K[0-9]+\.[0-9]+\.[0-9]+-canary\.[0-9]+\.[a-f0-9]+' || echo "")
53-
echo "newVersion=${VERSION}" >> $GITHUB_OUTPUT
54-
echo "Canary version: ${VERSION}"
55-
else
56-
echo "published=false" >> $GITHUB_OUTPUT
57-
fi
58-
env:
59-
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
60-
61-
- name: Comment on PR
62-
if: steps.canary.outputs.published == 'true'
63-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
64-
with:
65-
github-token: ${{ steps.generate-token.outputs.token }}
66-
script: |
67-
const version = '${{ steps.canary.outputs.newVersion }}';
68-
const body = `## Canary Release Published
69-
70-
**Version:** \`v${version}\`
71-
72-
This PR has been published as a canary release. Docker images will be built with this version tag.
73-
74-
### Testing
75-
You can test this canary by pulling:
76-
\`\`\`bash
77-
docker pull ghcr.io/${{ github.repository }}/catalog:v${version}
78-
\`\`\`
79-
`;
80-
81-
github.rest.issues.createComment({
82-
issue_number: context.issue.number,
83-
owner: context.repo.owner,
84-
repo: context.repo.repo,
85-
body: body
86-
});
1+
name: Canary Release
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
branches: [main, next]
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
packages: write
12+
13+
env:
14+
DOTNET_VERSION: "10.0.*"
15+
16+
concurrency:
17+
group: canary-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
canary:
22+
name: Create Canary Release
23+
runs-on: ubuntu-latest
24+
if: github.event_name == 'pull_request' && (github.event.head_commit == null || (!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')))
25+
outputs:
26+
canary-version: ${{ steps.canary.outputs.newVersion }}
27+
published: ${{ steps.canary.outputs.published }}
28+
steps:
29+
- name: Generate GitHub App Token
30+
id: generate-token
31+
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v2.0.0
32+
with:
33+
app-id: ${{ vars.AUTO_RELEASE_APP_ID }}
34+
private-key: ${{ secrets.AUTO_RELEASE_APP_PRIVATE_KEY }}
35+
36+
- name: Checkout
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
with:
39+
fetch-depth: 0
40+
token: ${{ steps.generate-token.outputs.token }}
41+
42+
- name: Setup Auto
43+
uses: auto-it/setup-auto@8088350955c4009f66570db1f401fa1e0adb5a38 # v2.0.0
44+
45+
- name: Create Canary Release
46+
id: canary
47+
run: |
48+
auto canary --pr ${{ github.event.pull_request.number }} --quiet > /tmp/canary-output.txt || echo "published=false" >> $GITHUB_OUTPUT
49+
50+
if grep -q "Published" /tmp/canary-output.txt; then
51+
echo "published=true" >> $GITHUB_OUTPUT
52+
VERSION=$(cat /tmp/canary-output.txt | grep -oP 'v\K[0-9]+\.[0-9]+\.[0-9]+-canary\.[0-9]+\.[a-f0-9]+' || echo "")
53+
echo "newVersion=${VERSION}" >> $GITHUB_OUTPUT
54+
echo "Canary version: ${VERSION}"
55+
else
56+
echo "published=false" >> $GITHUB_OUTPUT
57+
fi
58+
env:
59+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
60+
61+
- name: Comment on PR
62+
if: steps.canary.outputs.published == 'true'
63+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
64+
with:
65+
github-token: ${{ steps.generate-token.outputs.token }}
66+
script: |
67+
const version = '${{ steps.canary.outputs.newVersion }}';
68+
const body = `## Canary Release Published
69+
70+
**Version:** \`v${version}\`
71+
72+
This PR has been published as a canary release. Docker images will be built with this version tag.
73+
74+
### Testing
75+
You can test this canary by pulling:
76+
\`\`\`bash
77+
docker pull ghcr.io/${{ github.repository }}/catalog:v${version}
78+
\`\`\`
79+
`;
80+
81+
github.rest.issues.createComment({
82+
issue_number: context.issue.number,
83+
owner: context.repo.owner,
84+
repo: context.repo.repo,
85+
body: body
86+
});
Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
name: Build and Publish Auth Image
2-
3-
on:
4-
release:
5-
types: [published, prereleased]
6-
7-
permissions:
8-
contents: write
9-
packages: write
10-
id-token: write
11-
attestations: write
12-
security-events: write
13-
14-
jobs:
15-
get-version:
16-
name: Get Release Version
17-
runs-on: ubuntu-latest
18-
outputs:
19-
version: ${{ steps.version.outputs.version }}
20-
steps:
21-
- name: Get version from release
22-
id: version
23-
run: |
24-
VERSION="${{ github.event.release.tag_name }}"
25-
VERSION="${VERSION#v}"
26-
echo "version=$VERSION" >> $GITHUB_OUTPUT
27-
echo "Building auth version: $VERSION"
28-
29-
check-auth:
30-
name: Check if auth Dockerfile exists
31-
runs-on: ubuntu-latest
32-
outputs:
33-
exists: ${{ steps.check.outputs.exists }}
34-
steps:
35-
- name: Checkout
36-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37-
with:
38-
ref: refs/tags/${{ github.event.release.tag_name }}
39-
40-
- name: Check for auth Dockerfile
41-
id: check
42-
run: |
43-
if [ -f "src/auth/Dockerfile" ]; then
44-
echo "exists=true" >> $GITHUB_OUTPUT
45-
echo "Auth Dockerfile found"
46-
else
47-
echo "exists=false" >> $GITHUB_OUTPUT
48-
echo "Auth Dockerfile not found - skipping"
49-
fi
50-
51-
build-sign-sbom-auth:
52-
name: Build, Sign & SBOM - auth
53-
needs: [get-version, check-auth]
54-
if: needs.check-auth.outputs.exists == 'true'
55-
uses: ./.github/workflows/reusable-build-sign-sbom.yml
56-
with:
57-
service-name: auth
58-
version: ${{ needs.get-version.outputs.version }}
59-
dockerfile-path: src/auth/Dockerfile
60-
docker-context: '.'
61-
# Auth service doesn't need PostgreSQL/RabbitMQ (Keycloak-based)
62-
postgres-connection: ''
63-
rabbitmq-connection: ''
64-
secrets:
65-
harbor-url: ${{ secrets.HARBOR_URL }}
66-
harbor-username: ${{ secrets.HARBOR_USERNAME }}
67-
harbor-password: ${{ secrets.HARBOR_PASSWORD }}
68-
github-token: ${{ secrets.GITHUB_TOKEN }}
1+
name: Build and Publish Auth Image
2+
3+
on:
4+
release:
5+
types: [published, prereleased]
6+
7+
permissions:
8+
contents: write
9+
packages: write
10+
id-token: write
11+
attestations: write
12+
security-events: write
13+
14+
jobs:
15+
get-version:
16+
name: Get Release Version
17+
runs-on: ubuntu-latest
18+
outputs:
19+
version: ${{ steps.version.outputs.version }}
20+
steps:
21+
- name: Get version from release
22+
id: version
23+
run: |
24+
VERSION="${{ github.event.release.tag_name }}"
25+
VERSION="${VERSION#v}"
26+
echo "version=$VERSION" >> $GITHUB_OUTPUT
27+
echo "Building auth version: $VERSION"
28+
29+
check-auth:
30+
name: Check if auth Dockerfile exists
31+
runs-on: ubuntu-latest
32+
outputs:
33+
exists: ${{ steps.check.outputs.exists }}
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
with:
38+
ref: refs/tags/${{ github.event.release.tag_name }}
39+
40+
- name: Check for auth Dockerfile
41+
id: check
42+
run: |
43+
if [ -f "src/auth/Dockerfile" ]; then
44+
echo "exists=true" >> $GITHUB_OUTPUT
45+
echo "Auth Dockerfile found"
46+
else
47+
echo "exists=false" >> $GITHUB_OUTPUT
48+
echo "Auth Dockerfile not found - skipping"
49+
fi
50+
51+
build-sign-sbom-auth:
52+
name: Build, Sign & SBOM - auth
53+
needs: [get-version, check-auth]
54+
if: needs.check-auth.outputs.exists == 'true'
55+
uses: ./.github/workflows/reusable-build-sign-sbom.yml
56+
with:
57+
service-name: auth
58+
version: ${{ needs.get-version.outputs.version }}
59+
dockerfile-path: src/auth/Dockerfile
60+
docker-context: '.'
61+
# Auth service doesn't need PostgreSQL/RabbitMQ (Keycloak-based)
62+
postgres-connection: ''
63+
rabbitmq-connection: ''
64+
secrets:
65+
harbor-url: ${{ secrets.HARBOR_URL }}
66+
harbor-username: ${{ secrets.HARBOR_USERNAME }}
67+
harbor-password: ${{ secrets.HARBOR_PASSWORD }}
68+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)