Merge pull request #21 from containerinfra/renovate/docker-login-acti… #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pr | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
env: | |
IMAGE_NAME: ${{ github.event.repository.name }} | |
VERSION: '7.6.0' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up cosign | |
uses: sigstore/cosign-installer@main | |
- name: Verify base image | |
run: | | |
cosign dockerfile verify --base-image-only --certificate-oidc-issuer https://accounts.google.com --certificate-identity [email protected] Dockerfile | |
- name: Build container image | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
builder: ${{ steps.buildx.outputs.name }} | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ghcr.io/containerinfra/${{ env.IMAGE_NAME }}:${{ env.VERSION }} | |
docker.io/containerinfra/${{ env.IMAGE_NAME }}:${{ env.VERSION }} | |
build-args: | | |
OAUTH2_PROXY_VERSION=v${{ env.VERSION }} | |
labels: | | |
org.opencontainers.image.title=${{ github.event.repository.name }} | |
org.opencontainers.image.description=${{ github.event.repository.description }} | |
org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
org.opencontainers.image.revision=${{ github.sha }} | |
org.opencontainers.image.version=${{ env.VERSION }} |