-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(actions-bootstrap): update default actions
- Loading branch information
bootstrap-package-actions
committed
May 12, 2024
1 parent
75ff560
commit 21a6901
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
repository_dispatch: | ||
types: | ||
- rebase | ||
- pkgrel-incremented | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
|
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