Skip to content

publish

publish #145

Workflow file for this run

name: publish
on:
workflow_dispatch:
inputs:
publishAll:
required: true
type: boolean
default: false
schedule:
- cron: '0 0 * * *' # Run every day at midnight UTC
jobs:
buildMatrix:
runs-on: ubuntu-24.04
permissions:
contents: read
outputs:
BUILD_MATRIX: ${{ steps.generate.outputs.BUILD_MATRIX }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Generate build matrix
id: generate
shell: bash
run: |
./generateBuildMatrix.sh "${{ github.event.inputs.publishAll }}"
publish:
runs-on: ubuntu-24.04
needs:
- buildMatrix
if: ${{ needs.buildMatrix.outputs.BUILD_MATRIX != '' && toJson(fromJson(needs.buildMatrix.outputs.BUILD_MATRIX)) != '[]' }}
permissions:
contents: write
strategy:
matrix:
agp: ${{ fromJson(needs.buildMatrix.outputs.BUILD_MATRIX) }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Docker Hub login
shell: bash
run: |
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish
shell: bash
run: |
./publish.sh ${{ matrix.agp }}
- name: Docker Hub logout
if: always()
shell: bash
run: |
docker logout