3 changed files with 88 additions and 0 deletions
@ -0,0 +1,48 @@ |
|||
name: Backport Packages (Daily) |
|||
|
|||
# Everyday at02:00 UTC |
|||
on: |
|||
schedule: |
|||
- cron: '0 2 * * *' |
|||
# Enables manual triggering of the workflow |
|||
workflow_dispatch: |
|||
|
|||
# Grants the action write access to the repository |
|||
permissions: |
|||
contents: write |
|||
|
|||
jobs: |
|||
update-packages: |
|||
runs-on: ubuntu-latest |
|||
|
|||
# Defines the Fedora container for this job |
|||
container: |
|||
image: fedora:latest |
|||
|
|||
steps: |
|||
# 1. Checkout the repository |
|||
- name: Checkout repository |
|||
uses: actions/checkout@v4 |
|||
|
|||
# 2. Run the update script in the container |
|||
- name: Run update script |
|||
run: ./update.sh |
|||
|
|||
# 4. Prepare and push changes (if any) |
|||
- name: Commit and push changes |
|||
run: | |
|||
# Configure git |
|||
git config --global user.name 'github-actions[bot]' |
|||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' |
|||
|
|||
# Add all changes |
|||
git add . |
|||
|
|||
# Check if there are changes to commit |
|||
if ! git diff-index --quiet HEAD; then |
|||
echo "Changes detected. Committing and pushing..." |
|||
git commit -m "chore: Automatic package backport" |
|||
git push |
|||
else |
|||
echo "No changes to commit." |
|||
fi |
|||
@ -0,0 +1,33 @@ |
|||
name: Trigger COPR Build |
|||
|
|||
on: |
|||
# Trigger on push to main branch |
|||
#push: |
|||
# branches: |
|||
# - main |
|||
# Enables manual triggering of the workflow |
|||
workflow_dispatch: |
|||
|
|||
jobs: |
|||
build-copr: |
|||
runs-on: ubuntu-latest |
|||
|
|||
# Defines the Fedora container for this job |
|||
container: |
|||
image: fedora:latest |
|||
|
|||
steps: |
|||
# 1. Checkout the repository |
|||
- name: Checkout repository |
|||
uses: actions/checkout@v4 |
|||
|
|||
# 2. Install the 'copr-cli' dependency |
|||
- name: Install copr-cli |
|||
run: dnf install -y copr-cli |
|||
|
|||
# 3. Run the build script |
|||
- name: Run COPR build script |
|||
run: ./build.sh |
|||
# Inject secrets into the container as environment variables |
|||
env: |
|||
COPR_CONFIG: ${{ secrets.COPR_CONFIG }} |
|||
Loading…
Reference in new issue