Skip to content

Commit

Permalink
Fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
neboman11 committed Apr 21, 2024
1 parent c092a6a commit f3aca99
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,21 @@ name: Docker
# documentation.

on:
schedule:
- cron: '20 10 * * *'
push:
branches: [ "main" ]
branches: ["main"]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
tags: ["v*.*.*"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -43,7 +39,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: 'v2.1.1'
cosign-release: "v2.1.1"

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand Down Expand Up @@ -81,18 +77,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 comments on commit f3aca99

Please sign in to comment.