3.2.0-rc.4 #13
Workflow file for this run
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: Release | |
on: | |
release: | |
types: | |
- published | |
env: | |
TZ: 'Asia/Tokyo' | |
DATE: $(TZ='Asia/Tokyo' date '+%Y-%m-%d') | |
DATETIME: $(TZ='Asia/Tokyo' date '+%Y-%m-%d-%H-%M-%S') | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
IMAGE_AUTOMATION_TEST: automation-test | |
IMAGE_PHP: php-latest | |
IMAGE_PHP_BETA: php-beta | |
IMAGE_PUPPETEER: puppeteer-latest | |
IMAGE_REDIS: redis-latest | |
IMAGE_UBUNTU: ubuntu-latest | |
DOCKERFILE_PHP: ./php/latest.Dockerfile | |
DOCKERFILE_PHP_BETA: ./php/beta.Dockerfile | |
DOCKERFILE_PUPPETEER: ./puppeteer/latest.Dockerfile | |
DOCKERFILE_REDIS: ./database/redis/latest.Dockerfile | |
DOCKERFILE_UBUNTU: ./ubuntu/latest.Dockerfile | |
jobs: | |
automation: | |
name: 'Automation' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Validate | |
run: | |
# TODO Validate the Dockerfile | |
# https://docs.docker.com/build/checks/ | |
docker build --help | |
# - | |
# name: Publish | |
# uses: actions/[email protected] | |
# type=raw,${{ env.IMAGE_UBUNTU }} | |
release-ubuntu-latest: | |
name: '[Auto] Release Ubuntu latest' | |
needs: automation | |
runs-on: ubuntu-latest | |
environment: CI | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub # https://github.com/docker/login-action | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry # https://github.com/docker/login-action | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,enable=true,priority=600,prefix=${{ env.IMAGE_UBUNTU }}-,event=branch | |
type=semver,enable=true,priority=900,prefix=${{ env.IMAGE_UBUNTU }}-,pattern={{raw}} | |
type=sha,enable=true,priority=100,prefix=${{ env.IMAGE_UBUNTU }}-sha-,suffix=,format=short | |
- name: Build and push Docker images # https://github.com/docker/build-push-action | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ${{ env.DOCKERFILE_UBUNTU }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: false | |
# type=raw,${{ env.IMAGE_PHP_BETA }} | |
release-php-beta: | |
name: '[Auto] Release PHP beta' | |
needs: automation | |
runs-on: ubuntu-latest | |
environment: CI | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,enable=true,priority=600,prefix=${{ env.IMAGE_PHP_BETA }}-,event=branch | |
type=semver,enable=true,priority=900,prefix=${{ env.IMAGE_PHP_BETA }}-,pattern={{raw}} | |
type=sha,enable=true,priority=100,prefix=${{ env.IMAGE_PHP_BETA }}-sha-,suffix=,format=short | |
- name: Build and push Docker images | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ${{ env.DOCKERFILE_PHP_BETA }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: false | |
# type=raw,${{ env.IMAGE_PHP }} | |
release-php-latest: | |
name: '[Auto] Release PHP latest' | |
needs: automation | |
runs-on: ubuntu-latest | |
environment: CI | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,enable=true,priority=600,prefix=${{ env.IMAGE_PHP }}-,event=branch | |
type=semver,enable=true,priority=900,prefix=${{ env.IMAGE_PHP }}-,pattern={{raw}} | |
type=sha,enable=true,priority=100,prefix=${{ env.IMAGE_PHP }}-sha-,suffix=,format=short | |
- name: Build and push Docker images | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ${{ env.DOCKERFILE_PHP }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: false | |
# type=raw,${{ env.IMAGE_REDIS }} | |
release-redis-latest: | |
name: '[Auto] Release Redis latest' | |
needs: automation | |
runs-on: ubuntu-latest | |
environment: CI | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,enable=true,priority=600,prefix=${{ env.IMAGE_REDIS }}-,event=branch | |
type=semver,enable=true,priority=900,prefix=${{ env.IMAGE_REDIS }}-,pattern={{raw}} | |
type=sha,enable=true,priority=100,prefix=${{ env.IMAGE_REDIS }}-sha-,suffix=,format=short | |
- name: Build and push Docker images | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ${{ env.DOCKERFILE_REDIS }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: false | |
release-puppeteer-latest: | |
name: '[Auto] Release Puppeteer latest' | |
needs: automation | |
runs-on: ubuntu-latest | |
environment: CI | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=raw,enable=true,value=${{ env.IMAGE_PUPPETEER }} | |
type=semver,enable=true,priority=900,prefix=${{ env.IMAGE_PUPPETEER }}-,pattern={{raw}} | |
- name: Build and push Docker images | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ${{ env.DOCKERFILE_PUPPETEER }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: false | |