Daily COPR #16
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
name: Daily COPR | |
on: | |
schedule: | |
- cron: "30 6 * * 1-5" | |
workflow_dispatch: | |
jobs: | |
update_rpm: | |
runs-on: ubuntu-latest | |
name: Update RPM | |
permissions: | |
contents: write | |
env: | |
UPDATE_STATUS: "current" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update RPM | |
run: | | |
# Update spec with HEAD commit of dependencies | |
source ./scripts/update-rpm.sh --print-spec | |
update_rpm | |
# Output status to env | |
echo "UPDATE_STATUS=$update_status" >> $GITHUB_ENV | |
- name: Checkout submodules | |
if: ${{ env.UPDATE_STATUS == 'updated' }} | |
run: | | |
bash ./scripts/checkout-deps.sh | |
- uses: zyrouge/github-push-action@v1 | |
if: ${{ env.UPDATE_STATUS == 'updated' }} | |
with: | |
commit-message: "build(github-actions): automated update [skip ci]" | |
allow-empty-commit: false | |
- name: Build on COPR | |
if: ${{ env.UPDATE_STATUS == 'updated' }} | |
env: | |
COPR_WEBHOOK: ${{ secrets.COPR_WEBHOOK }} | |
run: | | |
curl -X POST $COPR_WEBHOOK |