add Cache layer #8
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: Auto Deploy | |
# Controls when the workflow will run | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [ closed ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
if: ${{ github.event.pull_request.merged }} | |
name: Call Azure Build Pipeline | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# default skip bump versioning | |
- name: Set as default skip bump versioning | |
run: | | |
echo "SEMVER=skip" >> $GITHUB_ENV | |
- name: Set major | |
run: | | |
echo "SEMVER=major" >> $GITHUB_ENV | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'breaking-change') }} | |
- name: Set minor | |
run: | | |
echo "SEMVER=minor" >> $GITHUB_ENV | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'enhancement') }} | |
- name: Set patch | |
run: | | |
echo "SEMVER=patch" >> $GITHUB_ENV | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'bug') }} | |
- name: Set skip | |
run: | | |
echo "SEMVER=skip" >> $GITHUB_ENV | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-for-release') }} | |
- name: Azure Pipelines Action - Jversion | |
uses: jacopocarlini/[email protected] | |
with: | |
azure-devops-project-url: https://dev.azure.com/pagopaspa/pagoPA-projects | |
azure-pipeline-name: 'pagopa-function-template.deploy' | |
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }} | |
azure-template-parameters: '{"ENV": "dev", "SEMVER": "${{env.SEMVER}}", "TEST": "true"}' | |
azure-pipeline-variables: '{"system.debug": "true"}' | |