|
|
|
@ -14,6 +14,12 @@ on:
|
|
|
|
|
required: true
|
|
|
|
|
default: 'warning'
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
# Use docker.io for Docker Hub if empty
|
|
|
|
|
REGISTRY: ghcr.io
|
|
|
|
|
# github.repository as <account>/<repo>
|
|
|
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
test:
|
|
|
|
|
name: Lint & Test Build
|
|
|
|
@ -45,14 +51,14 @@ jobs:
|
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
- name: Log into registry ${{ env.REGISTRY }}
|
|
|
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
|
|
|
|
- name: Log into GitHub Container Registry
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
|
registry: ${{ env.REGISTRY }}
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
- name: Build and push
|
|
|
|
|
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
|
with:
|
|
|
|
|
context: .
|
|
|
|
|
file: ./Dockerfile
|
|
|
|
@ -61,20 +67,14 @@ jobs:
|
|
|
|
|
build-args: |
|
|
|
|
|
COMMIT_TAG=${{ github.sha }}
|
|
|
|
|
tags: |
|
|
|
|
|
ghcr.io/lenaxia/overseerr:oidc-support
|
|
|
|
|
ghcr.io/lenaxia/overseerr:${{ github.sha }}
|
|
|
|
|
ghcr.io/${{ env.IMAGE_NAME }}:oidc-support
|
|
|
|
|
ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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}
|
|
|
|
|
|
|
|
|
|