forked from DGNum/infrastructure
chore(workflows): Regenerate npins-update
This commit is contained in:
parent
05935d95c5
commit
c58f68bab2
1 changed files with 29 additions and 0 deletions
|
@ -325,6 +325,35 @@ jobs:
|
|||
-o simple | grep \"$COMMIT_MESSAGE dgnum-chores\") ]; then\n tea pr create
|
||||
--description \"Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head
|
||||
\"$GIT_UPDATE_BRANCH\"\n fi\nfi\n"
|
||||
kat-pkgs:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.TEA_DGNUM_CHORES_TOKEN }}
|
||||
- env:
|
||||
GIT_UPDATE_BRANCH: npins-updates/kat-pkgs
|
||||
name: Switch to a new branch
|
||||
run: "if git ls-remote --exit-code --heads origin \"refs/heads/$GIT_UPDATE_BRANCH\"\
|
||||
; then\n git switch \"$GIT_UPDATE_BRANCH\"\n git rebase main\n echo \"\
|
||||
EXISTING_BRANCH=1\" >> $GITHUB_ENV\nelse\n git switch -C \"$GIT_UPDATE_BRANCH\"\
|
||||
\nfi\n"
|
||||
- env:
|
||||
COMMIT_MESSAGE: 'chore(npins): Update kat-pkgs'
|
||||
GIT_UPDATE_BRANCH: npins-updates/kat-pkgs
|
||||
name: Open a PR if updates are present
|
||||
run: "npins update kat-pkgs\n\nif [ ! -z \"$(git diff --name-only)\" ]; then\n\
|
||||
\ echo \"[+] Changes detected, pushing updates.\"\n\n git add npins\n\n\
|
||||
\ if [ -n \"$EXISTING_BRANCH\" ]; then\n git commit --amend --no-edit\n\
|
||||
\ git push --force\n else\n git commit --message \"$COMMIT_MESSAGE\"\
|
||||
\n git push -u origin \"$GIT_UPDATE_BRANCH\"\n fi\n\n # Connect to the
|
||||
server with the cli\n tea login add -n dgnum-chores -t \"${{ secrets.TEA_DGNUM_CHORES_TOKEN
|
||||
}}\" -u https://git.dgnum.eu\n\n # Create a pull request if needed\n # i.e.
|
||||
no PR with the same title exists\n if [ -z $(tea pr ls -f='title,author'
|
||||
-o simple | grep \"$COMMIT_MESSAGE dgnum-chores\") ]; then\n tea pr create
|
||||
--description \"Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head
|
||||
\"$GIT_UPDATE_BRANCH\"\n fi\nfi\n"
|
||||
liminix:
|
||||
runs-on: nix
|
||||
steps:
|
||||
|
|
Loading…
Add table
Reference in a new issue