Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use latest cosign and release steps #91

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
]
}