Skip to content

Build Container

Build Container #12

Workflow file for this run

name: Build Container
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # 0000 on Mondays
release:
types: [ published ]
permissions:
contents: read
packages: write
actions: write
concurrency:
group: build-base-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY_IMAGE: ghcr.io/iaa-inc/gh-runner
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
flavor: |
latest=true
- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: true