-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.43 KB
/
xp-archive-deploy-prod.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
name: Build and deploy XP archive to prod
on:
push:
branches:
- main
jobs:
build-and-deploy:
name: Build and deploy to prod
permissions:
contents: read
id-token: write
uses: ./.github/workflows/.xp-archive-deploy.yml
with:
naisEnv: prod
VITE_APP_ORIGIN: https://cms-arkiv.ansatt.nav.no
XP_ORIGIN: https://www.nav.no
HTML_RENDER_API: http://nav-enonicxp-frontend/render-from-props
secrets:
READER_TOKEN: ${{ secrets.READER_TOKEN }}
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
release:
name: Create a new release
needs: build-and-deploy
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Generate unique tag name
run: echo "TAG_NAME=$(date +%s)" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
target_commitish: main
tag_name: release/prod@${{ env.TAG_NAME }} # Generates a unique tag using timestamp
name: Release ${{ github.ref_name }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # This is a PAT with repo permissions