-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc8ba0f
commit 75d945a
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build Ostree Container Image | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
on: | ||
schedule: | ||
- cron: '00 9 * * *' | ||
push: | ||
branches: [ '*' ] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fedora:latest | ||
options: --privileged | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
env: | ||
registry: ${{ vars.REGISTRY }} | ||
username: ${{ vars.QUAY_USER }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
image: ${{ vars.IMAGE_NAME }} | ||
tag: ${{ github.ref_name }} | ||
composefile: ${{ vars.COMPOSEFILE }} | ||
run: | | ||
dnf -y install podman rpm-ostree git skopeo buildah selinux-policy-targeted | ||
skopeo login -u $username -p $password $registry | ||
mkdir -p repo cache | ||
ostree init --repo=repo --mode=archive | ||
rpm-ostree compose image --initialize-mode=if-not-exists \ | ||
--format registry --layer-repo repo --cachedir=cache \ | ||
$composefile \ | ||
$registry/$image:$tag | ||