Skip to content

chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1 #103

chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1

chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1 #103

Workflow file for this run

---
name: Release
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.release.outputs.published }}
release-git-tag: ${{ steps.release.outputs.release-git-tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
id: release
uses: ahmadnassri/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
artifacts:
needs: release
name: Create Release Artifacts
strategy:
matrix:
architecture: [aarch64, x86_64]
ostype: [linux-gnu, linux-musl]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Set environment variables
run: |
echo "ARCHITECTURE=${{ matrix.architecture }}" >> $GITHUB_ENV
echo "OSTYPE=${{ matrix.ostype }}" >> $GITHUB_ENV
echo "REGISTRY=ghcr.io"
- name: Build, and Package
run: make build/package
- name: Log in to the Container registry
if: ${{ needs.release.outputs.published == 'true' }}
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
if: ${{ needs.release.outputs.published == 'true' }}
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/kong/template-github-release
sep-tags: ' '
flavor: |
suffix=-${{ matrix.architecture }}-${{ matrix.ostype }}
tags: |
type=sha
type=ref,event=branch
type=semver,pattern={{version}},value=${{ needs.release.outputs.release-git-tag }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.release-git-tag }}
- name: Retag and Push
if: ${{ needs.release.outputs.published == 'true' }}
run: |
for tag in ${{ steps.meta.outputs.tags }}; do \
docker tag ghcr.io/template-github-release:build-$ARCHITECTURE-$OSTYPE $tag && \
docker push $tag; \
done
- name: Archive the package
if: ${{ needs.release.outputs.published == 'true' }}
run: |
tar -C package -czvf ${{ matrix.architecture }}-${{ matrix.ostype }}.tar.gz .
- name: Add Release Artifact to the Github Release
if: ${{ needs.release.outputs.published == 'true' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.release.outputs.release-git-tag }}
files: ${{ matrix.architecture }}-${{ matrix.ostype }}.tar.gz
multi-arch:
needs: [release, artifacts]
name: Create Release Artifacts
if: ${{ needs.release.outputs.published == 'true' }}
strategy:
matrix:
ostype: [linux-gnu, linux-musl]
runs-on: ubuntu-latest
steps:
- name: Log in to the Container registry
if: ${{ needs.release.outputs.published == 'true' }}
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Combine per architecture images into a single multi-arch manifest
run: |
docker pull ghcr.io/kong/template-github-release:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }}
docker pull ghcr.io/kong/template-github-release:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }}
docker manifest create ghcr.io/kong/template-github-release:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }} \
ghcr.io/kong/template-github-release:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }} \
ghcr.io/kong/template-github-release:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }}
docker manifest push ghcr.io/kong/template-github-release:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }}