Skip to content

Commit 45d2315

Browse files
Enable scheduled nightly container rebuilds
1 parent 92bd925 commit 45d2315

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

.github/workflows/build-image.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
branch:
1212
type: string
1313
required: true
14+
publish:
15+
type: boolean
16+
default: false
17+
required: false
1418

1519
jobs:
1620
build-image:
@@ -35,15 +39,15 @@ jobs:
3539
${{ env.IMAGE_NAME }}/Containerfile
3640
3741
- name: Log in to ghcr.io
38-
if: github.ref == 'refs/heads/main'
42+
if: inputs.publish == true
3943
uses: redhat-actions/podman-login@v1
4044
with:
4145
registry: ${{ env.REGISTRY }}
4246
username: t2linux
4347
password: ${{ secrets.GITHUB_TOKEN }}
4448

4549
- name: Push image to ghcr.io
46-
if: github.ref == 'refs/heads/main'
50+
if: inputs.publish == true
4751
uses: redhat-actions/push-to-registry@v2
4852
with:
4953
image: ${{ steps.build-image.outputs.image }}

.github/workflows/fedora-ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ jobs:
88
uses: ./.github/workflows/build-image.yml
99
with:
1010
image_name: "fedora-ci"
11-
tags: unstable ${{ github.sha }}
11+
tags: unstable
12+
publish: ${{ github.ref == 'refs/heads/main' }}
1213
branch: main

.github/workflows/nightly-update.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Update all images
2+
on:
3+
schedule:
4+
# Every day at 2:49 AM
5+
- cron: "49 2 * * *"
6+
7+
jobs:
8+
fedora-ci-40:
9+
uses: ./.github/workflows/build-image.yml
10+
with:
11+
image_name: "fedora-ci"
12+
tags: "40"
13+
branch: f40
14+
15+
fedora-ci-unstable:
16+
uses: ./.github/workflows/build-image.yml
17+
with:
18+
image_name: "fedora-ci"
19+
tags: unstable
20+
branch: main

0 commit comments

Comments
 (0)