Skip to content

publish

publish #63

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-22.04
permissions:
contents: read
outputs:
BUILD_MATRIX: ${{ steps.generate.outputs.BUILD_MATRIX }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Generate build matrix
id: generate
shell: bash
run: |
./generateBuildMatrix.sh "${{ github.event.inputs.publishAll }}"
publish:
runs-on: ubuntu-22.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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- 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