modified: .github/workflows/apply_on_push.yaml #30
Workflow file for this run
This file contains 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 Images | |
on: | |
push: | |
branches: | |
- deploy-infra-terraformv3 | |
paths-ignore: | |
- 'terraform/**' | |
- 'workflows/**' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
docker: | |
name: 'Docker Build and Push' | |
runs-on: ubuntu-latest | |
environment: dev-preview | |
env: | |
ARM_SUBSCRIPTION_ID: ${{ vars.ARM_SUBSCRIPTION_ID }} | |
ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }} | |
ARM_TENANT_ID: ${{ vars.ARM_TENANT_ID }} | |
ARM_USE_OIDC: "true" | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./terraform | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: 'Az CLI login using OIDC' | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ vars.ARM_CLIENT_ID }} | |
tenant-id: ${{ vars.ARM_TENANT_ID }} | |
subscription-id: ${{ vars.ARM_SUBSCRIPTION_ID }} | |
- name: Log in to ACR | |
run: az acr login --name crimomsw | |
- name: Build and push Client Docker image | |
run: | | |
pwd && docker buildx build --push --tag crimomsw.azurecr.io/client:${{ github.sha }} ../IMOMaritimeSingleWindow/Client | |
- name: Build and push Server Docker image | |
run: | | |
pwd && docker buildx build --push --tag crimomsw.azurecr.io/server:${{ github.sha }} ../IMOMaritimeSingleWindow/Server |