-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (38 loc) · 1.48 KB
/
nightly-update-and-trigger.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
name: Trigger a quay.io EE rebuild - update requirements.yml, ansible-builder files
on:
schedule:
- cron: "37 1 * * *"
workflow_dispatch:
jobs:
trigger-ee-rebuild:
runs-on: ubuntu-latest
name: Trigger a quay.io EE rebuild - update requirements.yml, ansible-builder files
steps:
- name: Set up Python
uses: actions/setup-python@v5
- name: Install ansible-builder and ansible
shell: bash
run: |
set -euxo pipefail
pip install -U ansible-builder ansible
- name: checkout current repo
uses: actions/checkout@v4
- name: Trigger a quay.io EE rebuild - update requirements.yml, ansible-builder files
shell: bash
run: |
set -euxo pipefail
python .github/scripts/update_and_return_versions.py
# use Dockerfile for quay.io builder
ansible-builder create -v 3 --file=builder.yml --output-filename=Dockerfile
if [ -n "$(git status -uno --porcelain)" ]; then
commitmsg="Collection versions and/or builder files were updated"
else
# force a change to trigger a rebuild
date -Ins > nochange.txt
git add nochange.txt
commitmsg="No changes - just trigger a rebuild"
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -a -m "$commitmsg"
git push