chore(deps): bump docker/login-action from 2.2.0 to 3.0.0 #91
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: # 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@v3 | |
- 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@v3 | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Set environment variables | |
run: | | |
grep -v '^#' .env >> $GITHUB_ENV | |
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@343f7c4344506bcbf9b4de18042ae17996df046d | |
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@v4 | |
with: | |
images: ghcr.io/kong/kong-openssl | |
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 }} | |
type=raw,value=${{ env.OPENSSL_VERSION }} | |
- name: Retag and Push | |
if: ${{ needs.release.outputs.published == 'true' }} | |
run: | | |
for tag in ${{ steps.meta.outputs.tags }}; do \ | |
docker tag ghcr.io/kong-openssl: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@v1 | |
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@343f7c4344506bcbf9b4de18042ae17996df046d | |
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/kong-openssl:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }} | |
docker pull ghcr.io/kong/kong-openssl:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }} | |
docker manifest create ghcr.io/kong/kong-openssl:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }} \ | |
ghcr.io/kong/kong-openssl:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }} \ | |
ghcr.io/kong/kong-openssl:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }} | |
docker manifest push ghcr.io/kong/kong-openssl:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }} |