Skip to content

Commit 13d60b0

Browse files
chore: sync file(s) from https://github.com/updatecli/udash.git (#159)
* chore: sync .github/workflows/updatecli_update.yaml file Made with ❤️️ by updatecli * chore: sync .github/workflows/updatecli.yaml file Made with ❤️️ by updatecli * chore: sync .github/workflows/updatecli_test.yaml file Made with ❤️️ by updatecli --------- Co-authored-by: updateclibot[bot] <92153806+updateclibot[bot]@users.noreply.github.com> Co-authored-by: Olivier Vernin <olivier@vernin.me>
1 parent bfd4e65 commit 13d60b0

3 files changed

Lines changed: 87 additions & 32 deletions

File tree

.github/workflows/updatecli.yaml

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,35 @@
1-
name: updatecli
1+
name: Updatecli
22
on:
33
release:
44
workflow_dispatch:
5-
push:
6-
branches: [main]
7-
pull_request:
8-
branches: [main]
95
schedule:
10-
# Run every hour
11-
- cron: "0 * * * *"
12-
permissions:
13-
contents: "write"
14-
pull-requests: "write"
6+
# Run at 12:00 every Saterday every 14 days
7+
- cron: '0 12 */14 * 6'
8+
159
jobs:
16-
updatecli:
10+
prepare:
1711
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
2012
steps:
2113
- name: "Checkout"
22-
uses: "actions/checkout@v4.2.2"
14+
uses: "actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3" # v6.0.0
15+
2316
- name: "Setup updatecli"
24-
uses: "updatecli/updatecli-action@v2"
25-
- name: Set up Go
26-
uses: actions/setup-go@v5.5.0
17+
uses: "updatecli/updatecli-action@5ca36367fadc6ad94d590984fd9c696e783ec635" # v2.96.0
18+
with:
19+
version: "v0.113.0-rc.1"
20+
21+
- name: "Set up Go"
22+
uses: "actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c" # v6.1.0
2723
with:
2824
go-version-file: "go.mod"
2925
id: go
30-
- name: "Run updatecli in dryrun"
31-
run: "updatecli compose diff"
32-
env:
33-
GITHUB_ACTOR: ${{ github.actor }}
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
- uses: tibdex/github-app-token@v2.1.0
36-
id: generate_token
37-
if: github.ref == 'refs/heads/main'
38-
with:
39-
app_id: ${{ secrets.UPDATECLIBOT_APP_ID }}
40-
private_key: ${{ secrets.UPDATECLIBOT_APP_PRIVKEY }}
26+
4127
- name: "Run updatecli"
42-
if: github.ref == 'refs/heads/main'
43-
run: "updatecli compose apply"
28+
run: updatecli compose apply --clean-git-branches=true --experimental
4429
env:
45-
GITHUB_ACTOR: ${{ secrets.UPDATECLI_BOT_GITHUB_ACTOR }}
46-
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
30+
UPDATECLI_GITHUB_APP_CLIENT_ID: ${{ secrets.UPDATECLIBOT_APP_ID }}
31+
UPDATECLI_GITHUB_APP_PRIVATE_KEY: ${{ secrets.UPDATECLIBOT_APP_PRIVKEY }}
32+
UPDATECLI_GITHUB_APP_INSTALLATION_ID: ${{ secrets.UPDATECLIBOT_APP_INSTALLATION_ID }}
33+
UPDATECLI_UDASH_API_URL: ${{ secrets.UPDATECLI_UDASH_API_URL }}
34+
UPDATECLI_UDASH_ACCESS_TOKEN: ${{ secrets.UPDATECLI_UDASH_ACCESS_TOKEN }}
35+
UPDATECLI_UDASH_URL: ${{ secrets.UPDATECLI_UDASH_URL }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Updatecli Test
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
prepare:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Checkout"
14+
uses: "actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3" # v6.0.0
15+
16+
- name: "Setup updatecli"
17+
uses: "updatecli/updatecli-action@5ca36367fadc6ad94d590984fd9c696e783ec635" # v2.96.0
18+
with:
19+
version: "v0.113.0-rc.1"
20+
21+
- name: "Set up Go"
22+
uses: "actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c" # v6.1.0
23+
with:
24+
go-version-file: "go.mod"
25+
id: go
26+
27+
- name: "Test updatecli in dry-run mode"
28+
run: "updatecli compose diff"
29+
env:
30+
# This step is executed in untrusted context. We use a GitHub token with minimal permissions.
31+
GITHUB_ACTOR: ${{ github.actor }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Updatecli - Update
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
prepare:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "Checkout"
13+
uses: "actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3" # v6.0.0
14+
15+
- name: "Setup updatecli"
16+
uses: "updatecli/updatecli-action@5ca36367fadc6ad94d590984fd9c696e783ec635" # v2.96.0
17+
with:
18+
version: "v0.113.0-rc.1"
19+
20+
- name: "Set up Go"
21+
uses: "actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c" # v6.1.0
22+
with:
23+
go-version-file: "go.mod"
24+
id: go
25+
26+
- name: "Run updatecli only on existing pipelines"
27+
run: updatecli compose apply --clean-git-branches=true --existing-only=true --experimental
28+
env:
29+
UPDATECLI_GITHUB_APP_CLIENT_ID: ${{ secrets.UPDATECLIBOT_APP_ID }}
30+
UPDATECLI_GITHUB_APP_PRIVATE_KEY: ${{ secrets.UPDATECLIBOT_APP_PRIVKEY }}
31+
UPDATECLI_GITHUB_APP_INSTALLATION_ID: ${{ secrets.UPDATECLIBOT_APP_INSTALLATION_ID }}
32+
UPDATECLI_UDASH_API_URL: ${{ secrets.UPDATECLI_UDASH_API_URL }}
33+
UPDATECLI_UDASH_ACCESS_TOKEN: ${{ secrets.UPDATECLI_UDASH_ACCESS_TOKEN }}
34+
UPDATECLI_UDASH_URL: ${{ secrets.UPDATECLI_UDASH_URL }}

0 commit comments

Comments
 (0)