π¦ Flow Snapshot Docker #55
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: π¦ Flow Snapshot Docker | |
on: | |
push: | |
branches-ignore: | |
- 'develop' | |
- 'uat' | |
- 'main' | |
paths-ignore: | |
- 'CODEOWNERS' | |
- '**.md' | |
- '.**' | |
workflow_dispatch: | |
inputs: | |
docker_build_enabled: | |
description: 'Enable Docker build' | |
required: false | |
default: 'true' | |
azdo_trigger_enabled: | |
description: 'Enable Azure DevOps trigger' | |
required: false | |
default: 'true' | |
deploy_aks_branch: | |
description: 'argocd deploy aks branch name' | |
required: false | |
default: 'main' | |
env: | |
CURRENT_BRANCH: ${{ github.event.inputs.branch || github.ref_name }} | |
jobs: | |
checkout: | |
name: π Checkout Repository | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
with: | |
ref: ${{ env.CURRENT_BRANCH }} | |
docker-build: | |
name: π¦ Docker Build and Push | |
needs: checkout | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event_name == 'push' || github.event.inputs.docker_build_enabled == 'true' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
with: | |
ref: ${{ env.CURRENT_BRANCH }} | |
- name: Run Snapshot Docker Build/Push | |
uses: pagopa/github-actions-template/payments-flow-docker-snapshot@new-azdo-trigger-pipeline | |
with: | |
current_branch: ${{ github.ref_name }} | |
azure-devops-trigger: | |
name: π °οΈ Azure DevOps Pipeline Trigger | |
needs: docker-build | |
runs-on: ubuntu-22.04 | |
if: | | |
always() && | |
needs.docker-build.result != 'failure' && | |
github.event.inputs.azdo_trigger_enabled == 'true' | |
steps: | |
- name: Trigger Azure DevOps Pipeline | |
uses: pagopa/github-actions-template/azure-devops-trigger-pipeline@new-azdo-trigger-pipeline | |
with: | |
enable_azure_devops_step: 'true' | |
azure_devops_project_url: 'https://dev.azure.com/pagopaspa/p4pa-projects' | |
azure_devops_pipeline_name: 'p4pa-payhub-deploy-aks.deploy' | |
azure_devops_pat: ${{ secrets.AZURE_DEVOPS_TOKEN }} | |
azure_template_parameters: | | |
{ | |
"APPS_TOP": "[p4pa-auth]", | |
"POSTMAN_BRANCH": "${{ github.ref_name }}" | |
} |