-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (45 loc) · 1.51 KB
/
docs-version.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
---
name: docs-version
on:
push:
paths:
- 'docs/**'
- 'docs-dependencies/**'
repository_dispatch:
types: [docs-version]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
id-token: write
contents: write
jobs:
docs-version:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: main
- name: Setup Git Configuration
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Process fqdn
run: |
export DOMAIN_NAME="${{ vars.DOCS_FQDN }}"
envsubst < docs-dependencies/certificate.yaml > docs-dependencies/certificate.processed.yaml
mv docs-dependencies/certificate.processed.yaml docs-dependencies/certificate.yaml
envsubst < docs/Ingress.yaml > docs/Ingress.processed.yaml
mv docs/Ingress.processed.yaml docs/Ingress.yaml
yq eval -i ".spec.template.spec.containers[0].image = \"${{ secrets.ACR_LOGIN_SERVER }}/docs:${{ vars.DOCS_VERSION }}\"" "docs/Deployment.yaml"
- name: Commit and Push Changes
run: |
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git commit -m "Process Dispatch"
git push -f origin main:docs-version
fi