chore: signed release (#12355)
* chore: signed release * fix: use single quotes
This commit is contained in:
@@ -37,10 +37,15 @@ jobs:
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
@@ -73,6 +78,7 @@ jobs:
|
||||
flavor: latest=false
|
||||
|
||||
- name: Build and push Docker image (ordinary version)
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
@@ -82,8 +88,12 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
cache-from: type=gha,scope=docker-release
|
||||
cache-to: type=gha,mode=max,scope=docker-release
|
||||
# cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:buildcache
|
||||
# cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:buildcache,mode=max
|
||||
|
||||
- name: Sign the published Docker image
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: 'true'
|
||||
run: echo "${{ steps.meta-ordinary.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
|
||||
|
||||
- name: Extract Docker metadata (Chromium-bundled version)
|
||||
id: meta-chromium-bundled
|
||||
@@ -98,6 +108,7 @@ jobs:
|
||||
flavor: latest=false
|
||||
|
||||
- name: Build and push Docker image (Chromium-bundled version)
|
||||
id: build-and-push-chromium
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
@@ -108,10 +119,14 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
cache-from: |
|
||||
type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:chromium-bundled
|
||||
# type=gha,scope=docker-release # not needed, Docker automatically uses local cache from the builder
|
||||
# type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:buildcache
|
||||
cache-to: type=inline,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:chromium-bundled # inline cache is enough
|
||||
|
||||
- name: Sign the published Docker image
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: 'true'
|
||||
run: echo "${{ steps.meta-chromium-bundled.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push-chromium.outputs.digest }}
|
||||
|
||||
description:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-env
|
||||
|
||||
Reference in New Issue
Block a user