v.5.4.3 #53
Workflow file for this run
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: Release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| prepare: | |
| name: Prepare modules for matrix build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| build_tag: ${{ steps.get-build-tag.outputs.build_tag }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate module.json | |
| run: ./generate_modules_json.sh > modules.json | |
| - id: set-matrix | |
| name: Read module.json into matrix | |
| run: echo "matrix=$(cat modules.json)" >> $GITHUB_OUTPUT | |
| - name: 'Get the version' | |
| id: get-build-tag | |
| run: echo "build_tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| build: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| name: Build and push docker images | |
| strategy: | |
| matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} | |
| steps: | |
| - name: 'Login to ACR' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ vars.REGISTRY_LOGIN_SERVER }} | |
| username: ${{ vars.REGISTRY_USERNAME }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v4 | |
| with: | |
| images: ${{ vars.REGISTRY_LOGIN_SERVER }}/${{ matrix.name }} | |
| tags: | | |
| type=semver,pattern={{version}},value=${{ needs.prepare.outputs.build_tag }} | |
| flavor: | | |
| latest=false | |
| - name: Build and push docker image | |
| id: docker_build | |
| uses: docker/build-push-action@v3 | |
| with: | |
| file: ${{ matrix.dockerfile }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| - name: Docker image digest | |
| run: echo ${{ steps.docker_build.outputs.digest }} |