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

Update packages

Update packages #346

Workflow file for this run

name: Update packages
on:
repository_dispatch:
types: [new_package_release]
workflow_dispatch:
workflow_run:
workflows: ["Reset APT repo"]
types:
- completed
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Rebase to main
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git switch gh-pages
git rebase -X theirs main
- name: Update packages
uses: radxa-repo/apt-repo-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: radxa-pkg
- name: Check for modified files
id: git-check
run: |
echo "modified=$([ -z "$(git status --porcelain)" ]; echo $?)" >> "$GITHUB_OUTPUT"
- name: Commit changes
if: steps.git-check.outputs.modified == 1
run: |
cat << EOF | gpg --import
${{ secrets.GPG_KEY }}
EOF
freight cache
git add .
git commit -m "Update packages"
git push -f