mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 09:46:11 +01:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
name: Build Indiekit Docker container
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- indiekit/**
|
|
- .github/workflows/indiekit-docker.yml
|
|
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "indiekit"
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
image-releaser:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Log into GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Extract metadata for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ghcr.io/by-jp/www.byjp.me
|
|
- name: Build and push Docker image
|
|
id: push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./indiekit
|
|
file: ./indiekit/Dockerfile
|
|
push: true
|
|
tags: ghcr.io/by-jp/www.byjp.me:indiekit
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
- name: Generate artifact attestation
|
|
uses: actions/attest-build-provenance@v1
|
|
with:
|
|
subject-name: ghcr.io/by-jp/www.byjp.me
|
|
subject-digest: ${{ steps.push.outputs.digest }}
|
|
push-to-registry: true
|