47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
name: Release container images
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
# Retry against the same tag if a registry operation was interrupted.
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
runs-on: ${{ vars.IMAGE_RUNNER_LABEL || 'ubuntu-latest' }}
|
|
container:
|
|
image: docker.gitea.com/runner-images:ubuntu-latest@sha256:fd911d7417bfbf0f454530e447da95b58001e1df41bbc5e1a8dd35d432575aae
|
|
env:
|
|
REGISTRY: ${{ vars.IMAGE_REGISTRY || 'git.anya.jp' }}
|
|
IMAGE_OWNER: ${{ vars.IMAGE_OWNER || 'anya' }}
|
|
RELEASE_REF: ${{ github.ref }}
|
|
PATH: /opt/acttoolcache/node/24.19.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
DOCKER_BUILD_SUMMARY: 'false'
|
|
DOCKER_BUILD_RECORD_UPLOAD: 'false'
|
|
steps:
|
|
- name: Checkout release tag
|
|
uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
persist-credentials: false
|
|
|
|
- name: Validate release version
|
|
run: node tools/ci/release-images.mjs --validate
|
|
|
|
- name: Set up Buildx tools
|
|
uses: https://github.com/docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
|
with:
|
|
version: v0.34.0
|
|
driver: docker
|
|
|
|
- name: Log in to registry
|
|
uses: https://github.com/docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Promote existing images without rebuilding
|
|
run: node tools/ci/release-images.mjs
|