Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Push ostree repo to separate branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Apacelus committed Nov 21, 2023
1 parent 0287fd9 commit f97231a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/update-ostree-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
image: fedora:latest
options: --name=fedora-container --cap-add CAP_SYS_ADMIN --privileged
volumes:
- /mnt/fedora-container:/mnt/rpm-ostree-repo
- ./:/mnt/rpm-ostree-repo
steps:
- name: Checking out repository code
uses: actions/checkout@v3
Expand All @@ -26,5 +26,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Fedora Tool
- name: Build ostree repo
run: bash build_rpm-ostree_repo.sh

- name: Pushing to ostree branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
# Disable setting repo owner as commit author
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

# Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes"
commit_message: Update ostree branch
branch: ostree-repo
create_branch: true
# Only include needed files
# file_pattern: './*'
# push_options: '--force'

6 changes: 3 additions & 3 deletions build_rpm-ostree_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ git clone --branch="f39" --depth=1 https://pagure.io/workstation-ostree-config.g
# copy eupneaos config into cloned ostree configs
cp ./configs/fedora-eupneaos.yaml ./workstation-ostree-config/fedora-eupneaos.yaml

mkdir -p /mnt/rpm-ostree-repo/repo /mnt/rpm-ostree-repo/cache
mkdir -p /tmp/ostree-cache

# Initialize the OSTree repository
ostree --repo=/mnt/rpm-ostree-repo/repo init --mode=archive
ostree --repo=/mnt/rpm-ostree-repo init --mode=archive

# build the ostree repo
rpm-ostree compose tree --repo=/mnt/rpm-ostree-repo/repo --cachedir=/mnt/rpm-ostree-repo/cache ./workstation-ostree-config/fedora-eupneaos.yaml
rpm-ostree compose tree --repo=/mnt/rpm-ostree-repo --cachedir=/tmp/ostree-cache ./workstation-ostree-config/fedora-eupneaos.yaml

0 comments on commit f97231a

Please sign in to comment.