Skip to content

Commit

Permalink
chore(actions-bootstrap): update default actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstrap-package-actions committed May 12, 2024
1 parent e1f3129 commit 44653b4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/increment-pkgrel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: increment-pkgrel

on:
repository_dispatch:
types:
- increment-pkgrel
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
increment-pkgrel:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@main
- id: increment-pkgrel
run: |
CURRENT_PKGREL=$(cat PKGBUILD | grep -oP 'pkgrel=\K[0-9]+')
INCREMENTED_PKGREL=$((CURRENT_PKGREL + 1))
sed -i "s/pkgrel=$CURRENT_PKGREL/pkgrel=$INCREMENTED_PKGREL/" PKGBUILD
- name: commit
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "Manjaro Bot"
git config user.email "info@jonas-strassel.de"
git add PKGBUILD
git commit -m "chore(actions-increment-pkgrel): increment pkgrel"
git push
fi
- name: dispatch
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
with:
token: ${{ secrets.DISPATCH_TOKEN || github.token }}
repository: ${{ github.repository }}
event-type: pkgrel-incremented
1 change: 1 addition & 0 deletions .github/workflows/pkgbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
repository_dispatch:
types:
- rebase
- pkgrel-incremented
workflow_dispatch:
push:
branches:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '*/30 * * * *'

concurrency:
group: rebase
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
Expand All @@ -33,6 +33,10 @@ jobs:
uses: mikefarah/yq@557dcb87b8efe786f89a12c09e9046b4753ab72e # v4.44.1
with:
cmd: yq '.repository.topics += ", any"' -i .github/settings.yml
- if: steps.version.outputs.python == 'true'
uses: mikefarah/yq@557dcb87b8efe786f89a12c09e9046b4753ab72e # v4.44.1
with:
cmd: yq '.repository.topics += ", python"' -i .github/settings.yml
- name: commit
run: |
if [ -n "$(git status --porcelain)" ]; then
Expand Down

0 comments on commit 44653b4

Please sign in to comment.