File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Pinact update
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - " .github/workflows/**"
9+ schedule :
10+ # Weekly on Monday at 00:00 UTC
11+ - cron : " 0 0 * * 1"
12+ workflow_dispatch : {}
13+
14+ permissions :
15+ contents : write
16+ pull-requests : write
17+
18+ jobs :
19+ pinact :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
25+ - name : Install aqua (installs pinact)
26+ uses : aquaproj/aqua-installer@11dd79b4e498d471a9385aa9fb7f62bb5f52a73c # v4.0.4
27+ with :
28+ aqua_version : v2.56.1
29+ aqua_opts : " -c aqua.yaml"
30+
31+ - name : Run pinact (fix workflow files)
32+ shell : bash
33+ run : |
34+ set -euo pipefail
35+
36+ # Keep the job going even if pinact exits non-zero due to changes.
37+ set +e
38+ aqua exec -- pinact run \
39+ --check \
40+ --diff \
41+ --fix \
42+ --update \
43+ --min-age "30"
44+ exit_code="$?"
45+ set -e
46+
47+ echo "pinact exit code: ${exit_code}"
48+
49+ - name : Create PR (if changes)
50+ uses : peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
51+ with :
52+ token : ${{ secrets.PINACT_GITHUB_TOKEN }}
53+ commit-message : " chore(pinact): pin/update GitHub Actions"
54+ title : " chore(pinact): pin/update GitHub Actions"
55+ body : |
56+ Automated update by pinact.
57+ branch : " ci/pinact_action"
58+ delete-branch : true
You can’t perform that action at this time.
0 commit comments