chore: retry infra-bemisc deploy and proxy 1.2.9 release #14
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: Build and Push Proxy Images | |
| on: | |
| push: | |
| branches-ignore: | |
| - none | |
| paths: | |
| - "proxy/**" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| timeout-minutes: 180 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { dockerfile: "proxy/lets-logic/Dockerfile", context: "proxy/lets-logic", image_name: "lets-logic", tag_name: "latest", platforms: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8" } | |
| - { dockerfile: "proxy/lets-logic/Dockerfile.pypy", context: "proxy/lets-logic", image_name: "lets-logic", tag_name: "pypy", platforms: "linux/386,linux/amd64,linux/arm64/v8" } | |
| - { dockerfile: "proxy/multi-logic/Dockerfile", context: "proxy/multi-logic", image_name: "multi-logic", tag_name: "latest", platforms: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8" } | |
| - { dockerfile: "proxy/multi-logic/Dockerfile.pypy", context: "proxy/multi-logic", image_name: "multi-logic", tag_name: "pypy", platforms: "linux/386,linux/amd64,linux/arm64/v8" } | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Read image version | |
| id: version | |
| run: echo "version=$(tr -d '\r\n' < proxy/VERSION)" >> $GITHUB_OUTPUT | |
| - name: Set tag names based on branch | |
| id: set_tag | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| TAG_NAME=${{ matrix.config.tag_name }} | |
| if [[ "$TAG_NAME" == "latest" ]]; then | |
| VERSION_TAG="$VERSION" | |
| else | |
| VERSION_TAG="$VERSION-$TAG_NAME" | |
| fi | |
| if [[ "${{ github.ref_name }}" == "master" ]]; then | |
| echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT | |
| echo "version_tag=$VERSION_TAG" >> $GITHUB_OUTPUT | |
| else | |
| GITHUB_REFNAME=${{ github.ref_name }} | |
| BRANCH_NAME=${GITHUB_REFNAME//\//_} | |
| echo "tag=$TAG_NAME-$BRANCH_NAME" >> $GITHUB_OUTPUT | |
| echo "version_tag=$VERSION_TAG-$BRANCH_NAME" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: ${{ matrix.config.context }} | |
| file: ${{ matrix.config.dockerfile }} | |
| platforms: ${{ matrix.config.platforms }} | |
| push: true | |
| sbom: true | |
| provenance: mode=max | |
| tags: | | |
| hivesolutions/${{ matrix.config.image_name }}:${{ steps.set_tag.outputs.tag }} | |
| hivesolutions/${{ matrix.config.image_name }}:${{ steps.set_tag.outputs.version_tag }} | |
| deploy: | |
| name: Deploy | |
| if: github.event_name == 'push' && github.ref_name == 'master' | |
| needs: build | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| service: [proxy, proxy-ssl, proxy-cert] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Read image version | |
| id: version | |
| run: echo "version=$(tr -d '\r\n' < proxy/VERSION)" >> $GITHUB_OUTPUT | |
| - name: Trigger infra-bemisc deployment | |
| uses: hivesolutions/deploy-action@v1 | |
| with: | |
| repository: hivesolutions/infra-bemisc | |
| service: ${{ matrix.service }} | |
| group: frontend | |
| tag: ${{ steps.version.outputs.version }} | |
| token: ${{ secrets.INFRA_DEPLOY_PAT }} |