Skip to content

Docker

Docker #48

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: '24 2 * * *'
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
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
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build, Sign and Publish docker image
uses: ./.github/actions/build-image
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
build_debug:
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build, Sign and Publish docker image (debug)
uses: ./.github/actions/build-image
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-debug
file: Dockerfile.debug
token: ${{ secrets.GITHUB_TOKEN }}