-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (80 loc) · 2.53 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Release and Deploy
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- 'CODEOWNERS'
- '**.md'
- '.**'
- '.identity/**'
jobs:
release:
name: Release
runs-on: ubuntu-24.04
permissions:
contents: write
issues: write
packages: write
pull-requests: read
outputs:
new-release-published: ${{ steps.release.outputs.new-release-published }}
new-release-image: ${{ steps.release.outputs.new-release-image }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Release
id: release
uses: pagopa/ict-github-actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Print release info
shell: bash
run: |
echo "Release published: ${{ steps.release.outputs.new-release-published }}"
echo "Release image: ${{ steps.release.outputs.new-release-image }}"
echo "Release version: ${{ steps.release.outputs.new-release-version }}"
deploy-uat:
name: Deploy UAT
runs-on: ubuntu-24.04
environment: uat
needs: [release]
if: needs.release.outputs.new-release-published == 'true'
permissions:
id-token: write
contents: read
steps:
- name: Deploy
uses: pagopa/ict-github-actions/[email protected]
with:
tenant-id: ${{ secrets.ARM_TENANT_ID }}
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
client-id: ${{ secrets.ARM_CLIENT_ID }}
resource-group-name: ${{ vars.RESOURCE_GROUP_NAME }}
app-name: ${{ vars.APP_NAME }}
image: ${{ needs.release.outputs.new-release-image }}
# TODO disabled at the moment
# deploy-prod:
# name: Deploy PROD
# runs-on: ubuntu-24.04
# environment: prod
# needs: [release]
# if: needs.release.outputs.new-release-published == 'true'
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Deploy
# uses: pagopa/ict-github-actions/[email protected]
# with:
# tenant-id: ${{ secrets.ARM_TENANT_ID }}
# subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
# client-id: ${{ secrets.ARM_CLIENT_ID }}
# resource-group-name: ${{ vars.RESOURCE_GROUP_NAME }}
# app-name: ${{ vars.APP_NAME }}
# image: ${{ needs.release.outputs.new-release-image }}