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 75ff560 commit 21a6901
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
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: increment-pkgrel
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 "[email protected]"
git add PKGBUILD
git commit -m "chore(actions-increment-pkgrel): increment pkgrel"
git push
fi
- name: dispatch
uses: peter-evans/repository-dispatch@26b39ed245ab8f31526069329e112ab2fb224588 # v2
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
4 changes: 4 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 21a6901

Please sign in to comment.