Skip to content

ci: remove pr clean workflow (handled in main) #9

ci: remove pr clean workflow (handled in main)

ci: remove pr clean workflow (handled in main) #9

name: Generate release config
on:
push:
branches:
- main
permissions:
contents: read
jobs:
get-available-images-matrix:
uses: ./.github/workflows/__shared-get-available-images-matrix.yml
generate-release-config:
needs: [get-available-images-matrix]
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
image: ${{ fromJson(needs.get-available-images-matrix.outputs.images-matrix) }}
steps:
- uses: actions/checkout@v4
- run: |
TEMPLATE_CONTENT=$(cat .github/release-config.template.yml)
# Generate release-drafter config from template
IMAGE_NAME="${{ matrix.image }}"
CONFIG_CONTENT=$(echo "$TEMPLATE_CONTENT" | sed -E "s/\{\{image\}\}/$IMAGE_NAME/g")
# Write release-drafter config
mkdir -p ./.github/release-config
echo "$CONFIG_CONTENT" > ./.github/release-config/${{ matrix.image }}-release-config.yml
- uses: actions/upload-artifact@v4
with:
name: changed-files-${{ matrix.image }}
path: ./.github/release-config/${{ matrix.image }}-release-config.yml
publish-actions-readme:
needs: generate-release-config
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: changed-files-*
merge-multiple: true
path: ./.github/release-config/
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ vars.CI_BOT_APP_ID }}
private_key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
- uses: hoverkraft-tech/ci-github-common/actions/[email protected]
with:
github-token: ${{ steps.generate-token.outputs.token }}
branch: chore/release-config
title: "chore: update release config files"
body: Update release config files
commit-message: |
chore: update release config files
[skip ci]