Skip to content

chore(container): update docker.io/1337kavin/piped-frontend:latest do… #246

chore(container): update docker.io/1337kavin/piped-frontend:latest do…

chore(container): update docker.io/1337kavin/piped-frontend:latest do… #246

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release
'on':
workflow_dispatch:
push:
branches:
- master
paths:
- apps/**
env:
IMAGE_REGISTRY: ghcr.io
jobs:
changed-files:
name: Generate Build Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: "${{ steps.generate-token.outputs.token }}"
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
with:
files: apps/**
dir_names_max_depth: 2
dir_names: true
escape_json: false
json: true
quotepath: false
safe_output: false
- name: List all changed files
run: echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}"
push:
name: Push
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write
needs:
- changed-files
strategy:
matrix:
containers: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
max-parallel: 4
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Prepare
id: prep
run: |
container_name=$(basename ${{ matrix.containers }})
echo "container-name=${container_name}" >> "${GITHUB_OUTPUT}"
container_image=$(head -1 ./apps/${container_name}/Dockerfile | sed 's/^FROM //')
container_version=$(cut -d':' -f2 <<< "${container_image}")
if [[ "${container_version}" == *sha256 ]]; then
container_version=$(cut -d'@' -f1 <<< "${container_version}")
fi
echo "container-version=${container_version}" >> "${GITHUB_OUTPUT}"
container_platform=$(cat ./apps/${container_name}/PLATFORM)
echo "container-platform=${container_platform}" >> "${GITHUB_OUTPUT}"
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Build and Push
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
build-args: VERSION=${{ steps.prep.outputs.container-version }}
context: .
platforms: ${{ steps.prep.outputs.container-platform }}
file: ./apps/${{ steps.prep.outputs.container-name }}/Dockerfile
push: true
tags: |
${{ env.IMAGE_REGISTRY }}/${{ github.repository_owner }}/${{ steps.prep.outputs.container-name }}:${{ steps.prep.outputs.container-version }}