forked from opendatahub-io/notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.3 KB
/
update-commit-latest-env.yaml
File metadata and controls
46 lines (41 loc) · 1.3 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
---
name: Update commit-latest.env on params-latest.env change
"on":
workflow_dispatch:
schedule:
- cron: '0 11 * * *' # Daily at midnight UTC
push:
branches:
- main
- rhoai-*
paths:
- 'manifests/base/params-latest.env'
jobs:
sync-commit:
runs-on: ubuntu-latest
concurrency:
group: update-commit-latest-env-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update manifests/base/commit-latest.env
id: update_env
run: |
python3 scripts/update-commit-latest-env.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# Check for changes before committing
if ! git diff --quiet manifests/base/commit-latest.env; then
git add manifests/base/commit-latest.env
git commit -m "ci: update commit SHAs for image digests changes"
git push
else
echo "No effective changes in manifests/base/commit-latest.env, skipping commit."
fi