-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.72 KB
/
updatecli.yaml
File metadata and controls
55 lines (52 loc) · 1.72 KB
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
name: Updatecli Compose
on:
# push:
# branches:
# - main
# schedule:
# - cron: "*/15 * * * *"
workflow_dispatch: null
permissions:
contents: "write"
pull-requests: "write"
env:
UPDATECLI_ORG: updatecli-test
OTHER_ORG: updatecli
UPDATECLI_REPO: github-actions
UPDATECLI_BRANCH: main
jobs:
updatecli:
runs-on:
- ubuntu-latest
steps:
- uses: "tibdex/github-app-token@v2.1.0"
id: own_token
with:
app_id: ${{ secrets.GITHUB_APP_ID }}
private_key: ${{ secrets.GITHUB_APP_PRIVATE_KEY }}
installation_retrieval_mode: organization
installation_retrieval_payload: ${{ env.UPDATECLI_ORG }}
- uses: "tibdex/github-app-token@v2.1.0"
id: source_token
with:
app_id: ${{ secrets.GITHUB_APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_retrieval_mode: organization
installation_retrieval_payload: ${{ env.OTHER_GITHUB_ORG }}
- name: Checkout the repository
uses: "actions/checkout@v4.2.2"
- name: Install Updatecli in the runner
uses: "updatecli/updatecli-action@v2"
- name: Run Updatecli in Dry Run mode
run: "updatecli compose diff"
env:
GITHUB_TOKEN: ${{ steps.own_token.outputs.token }}
GITHUB_ACTOR: ${{ github.actor }}
UPDATE_GITHUB_TOKEN: ${{ steps.source_token.outputs.token }}
- name: Run Updatecli in apply mode
if: github.ref == 'refs/heads/main'
run: "updatecli compose apply"
env:
GITHUB_TOKEN: ${{ steps.own_token.outputs.token }}
GITHUB_ACTOR: ${{ github.actor }}
UPDATE_GITHUB_TOKEN: ${{ steps.source_token.outputs.token }}