Skip to content

Build 'release-tools' #237

Build 'release-tools'

Build 'release-tools' #237

name: Build 'release-tools'
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
push:
branches:
- main
paths:
- 'images/release-tools/**'
- '.github/workflows/build-release-tools.yml'
pull_request:
branches:
- main
paths:
- 'images/release-tools/**'
- '.github/workflows/build-release-tools.yml'
jobs:
build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup qemu
uses: docker/setup-qemu-action@v3
- name: setup docker
uses: docker/setup-buildx-action@v3
- name: login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: docker metadata
uses: docker/metadata-action@v5
id: meta
with:
images: |
ghcr.io/${{ github.repository }}/release-tools
tags: |
type=ref,event=branch,suffix=-${{ github.sha }}
type=ref,event=pr
type=sha,format=long
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=nightly,enable=${{ github.event.schedule == '0 0 * * *' }}
- name: build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./images/release-tools/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}