Skip to content

feat(values): disable healthcheck crossAZ for proxy lb by default (#62) #37

feat(values): disable healthcheck crossAZ for proxy lb by default (#62)

feat(values): disable healthcheck crossAZ for proxy lb by default (#62) #37

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: read
packages: write
attestations: write
id-token: write
jobs:
build-packages:
strategy:
matrix:
include:
- os: ubuntu-24.04
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
name: Build packages for ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set GitHub vars
id: github
uses: ./.github/actions/github
- name: Write Melange Signing Key
id: melange-signing-key
shell: bash
env:
PUBLIC_KEY_BASE64: ${{ vars.MELANGE_PUBLIC_KEY_BASE64 }}
SIGNING_KEY_BASE64: ${{ secrets.MELANGE_SIGNING_KEY_BASE64 }}
run: |
mkdir -p ${{ github.workspace }}/packages
echo -n "$PUBLIC_KEY_BASE64" | base64 -d > ${{ github.workspace }}/packages/melange.rsa.pub
echo -n "$SIGNING_KEY_BASE64" | base64 -d > ${{ github.workspace }}/packages/melange.rsa
file ${{ github.workspace }}/packages/melange.rsa
- name: Build packages
id: apk
uses: ./.github/actions/melange
with:
version: ${{ steps.github.outputs.ga-version }}
arch: ${{ steps.github.outputs.arch }}
signing-key: ${{ github.workspace }}/packages/melange.rsa
output-dir: ${{ github.workspace }}/packages
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: packages-${{ steps.github.outputs.arch }}
path: ${{ github.workspace }}/packages/${{ steps.github.outputs.arch }}/
retention-days: 1
publish:
strategy:
matrix:
include:
- variant: 'prod'
tag-suffix: ''
- variant: 'shell'
tag-suffix: '-shell'
name: Publish ${{ matrix.variant }} image
needs: [build-packages]
runs-on: ubuntu-24.04
steps:
- uses: imjasonh/[email protected]
- uses: sigstore/cosign-installer@v3
- name: Checkout
uses: actions/checkout@v5
- name: Set GitHub vars
id: github
uses: ./.github/actions/github
- name: Login to GitHub registry
uses: docker/login-action@v3
id: login-to-github
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to DockerHub registry
uses: docker/login-action@v3
id: login-to-docker-hub
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Write Melange Public Key
id: melange-public-key
shell: bash
env:
PUBLIC_KEY_BASE64: ${{ vars.MELANGE_PUBLIC_KEY_BASE64 }}
run: |
mkdir -p ${{ github.workspace }}/packages
echo -n "$PUBLIC_KEY_BASE64" | base64 -d > ${{ github.workspace }}/packages/melange.rsa.pub
- name: Download aarch64 packages
uses: actions/download-artifact@v5
with:
name: packages-aarch64
path: ${{ github.workspace }}/packages/aarch64
- name: Download x86_64 packages
uses: actions/download-artifact@v5
with:
name: packages-x86_64
path: ${{ github.workspace }}/packages/x86_64
- name: Publish image
id: publish
uses: ./.github/actions/apko
with:
config: 'apko/${{ matrix.variant }}.yaml'
tag: 'ghcr.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }}'
repository-append: ${{ github.workspace }}/packages
keyring-append: ${{ github.workspace }}/packages/melange.rsa.pub
publish: 'true'
- name: Scan image
id: scan
uses: anchore/scan-action@v6
with:
image: 'ghcr.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }}'
cache-db: true
fail-build: 'false'
severity-cutoff: 'high'
output-format: 'sarif'
- name: Sign and Attest
id: sign
uses: ./.github/actions/cosign
with:
image: 'ghcr.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }}'
attest-provenance: 'true'
- name: Copy image to DockerHub
id: copy
shell: bash
env:
COSIGN_YES: "true"
run: |
cosign copy \
--force \
ghcr.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }} \
docker.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }}
- if: steps.github.outputs.version == steps.github.outputs.ga-version
name: Tag image as latest
shell: bash
run: |
crane tag \
ghcr.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }} \
latest${{ matrix.tag-suffix }}
crane tag \
docker.io/${{ steps.github.outputs.repository }}:${{ steps.github.outputs.version }}${{ matrix.tag-suffix }} \
latest${{ matrix.tag-suffix }}
publish-chart:
name: Publish Helm Chart
needs: [publish]
runs-on: ubuntu-24.04
steps:
- uses: azure/[email protected]
- name: Checkout
uses: actions/checkout@v5
- name: Set GitHub vars
id: github
uses: ./.github/actions/github
- name: Login to GitHub registry
shell: bash
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login \
ghcr.io \
--username ${{ github.actor }} \
--password-stdin
- name: Publish Helm chart
uses: ./.github/actions/helm
with:
chart: ${{ github.workspace }}/helm/ggbridge
version: ${{ steps.github.outputs.version }}
app-version: ${{ steps.github.outputs.version }}
publish: 'true'
registry: oci://ghcr.io/${{ steps.github.outputs.repository }}/helm