Skip to content

Commit

Permalink
ci: use latest cosign and release steps (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeinhaus authored Apr 2, 2024
2 parents e4e48a1 + 35ab226 commit be3bf2b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
with:
cosign-release: 'v1.13.1'
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -75,7 +73,13 @@ jobs:
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
DIGEST: ${{ steps.build-and-push.outputs.digest }}
TAGS: ${{ steps.meta.outputs.tags }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a token
- name: "🪙 Generate a token"
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.SEMANTIC_RELEASE_APP_ID }}
private_key: ${{ secrets.SEMANTIC_RELEASE_KEY_PEM }}
- name: "☁️ Checkout repository"
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: "🚀 Release 🎉"
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 22.0.5
branches: |
["main"]
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
17 changes: 5 additions & 12 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
{
"branches": ["main"],
"plugins":
[
[
"@semantic-release/commit-analyzer",
{ "preset": "conventionalcommits" }
],
[
"@semantic-release/release-notes-generator",
{ "preset": "conventionalcommits" }
],
"@semantic-release/github"
]
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}

0 comments on commit be3bf2b

Please sign in to comment.