Skip to content

Commit

Permalink
Enable scheduled nightly container rebuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpenedblade committed Sep 19, 2024
1 parent 92bd925 commit 45d2315
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
branch:
type: string
required: true
publish:
type: boolean
default: false
required: false

jobs:
build-image:
Expand All @@ -35,15 +39,15 @@ jobs:
${{ env.IMAGE_NAME }}/Containerfile
- name: Log in to ghcr.io
if: github.ref == 'refs/heads/main'
if: inputs.publish == true
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: t2linux
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image to ghcr.io
if: github.ref == 'refs/heads/main'
if: inputs.publish == true
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/fedora-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ jobs:
uses: ./.github/workflows/build-image.yml
with:
image_name: "fedora-ci"
tags: unstable ${{ github.sha }}
tags: unstable
publish: ${{ github.ref == 'refs/heads/main' }}
branch: main
20 changes: 20 additions & 0 deletions .github/workflows/nightly-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Update all images
on:
schedule:
# Every day at 2:49 AM
- cron: "49 2 * * *"

jobs:
fedora-ci-40:
uses: ./.github/workflows/build-image.yml
with:
image_name: "fedora-ci"
tags: "40"
branch: f40

fedora-ci-unstable:
uses: ./.github/workflows/build-image.yml
with:
image_name: "fedora-ci"
tags: unstable
branch: main

0 comments on commit 45d2315

Please sign in to comment.