fix(4.0): update to 80a6fdf4a37411856bbc732d257d4e8797ecd7e5 #198
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 Publish Docker | |
| on: | |
| push: | |
| branches: | |
| - support-4.0-multiaccount-outbound | |
| jobs: | |
| build_and_push: | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE_NAME: midpoint-builder | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare Image Tag | |
| id: prep | |
| run: | | |
| BASE_REVISION=4.0 | |
| RELEASE_REVISION=`grep "ARG RELEASE_REVISION" Dockerfile | cut -d "=" -f 2` | |
| IMAGE_TAG=${BASE_REVISION}-${RELEASE_REVISION} | |
| FULL_IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/${IMAGE_NAME} | |
| echo "Building $FULL_IMAGE_NAME:$IMAGE_TAG" | |
| echo ::set-output name=name::${FULL_IMAGE_NAME} | |
| echo ::set-output name=tag::${IMAGE_TAG} | |
| - name: Build and push | |
| uses: docker/build-push-action@v2 | |
| with: | |
| push: true | |
| tags: ${{ steps.prep.outputs.name }}:${{ steps.prep.outputs.tag }} | |
| cache-from: type=registry,ref=${{ steps.prep.outputs.name }}:support-4.0 | |
| cache-to: type=registry,ref=${{ steps.prep.outputs.name }}:support-4.0,mode=max | |