publish #243
This file contains hidden or 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: publish | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| publishAll: | |
| required: true | |
| type: boolean | |
| default: false | |
| schedule: | |
| - cron: '0 1 * * *' # Run every day at 1 AM | |
| jobs: | |
| buildMatrix: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| outputs: | |
| BUILD_MATRIX: ${{ steps.generate.outputs.BUILD_MATRIX }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - 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: | |
| channelAndAgp: ${{ fromJson(needs.buildMatrix.outputs.BUILD_MATRIX) }} | |
| steps: | |
| - name: Maximize build space | |
| uses: AdityaGarg8/remove-unwanted-software@e2a42bc9a15f8414a9078f38b702de2a2976733d # v3 | |
| with: | |
| remove-dotnet: true | |
| remove-haskell: true | |
| remove-codeql: true | |
| remove-large-packages: true | |
| remove-cached-tools: true | |
| remove-swapfile: true | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - 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.channelAndAgp }} | |
| - name: Docker Hub logout | |
| if: always() | |
| shell: bash | |
| run: | | |
| docker logout |