Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Update and create PR #7

Update and create PR

Update and create PR #7

Workflow file for this run

name: Update and create PR
on:
workflow_dispatch:
jobs:
update-go:
runs-on: ubuntu-latest
env:
CI_COMMIT_AUTHOR: Github Action
CI_COMMIT_EMAIL: "[email protected]"
steps:
- uses: actions/checkout@v3
- run: go get -u ./...
- run: go mod tidy
- name: Commit files
run: |
git config user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config user.email "${{ env.CI_COMMIT_EMAIL }}"
git add go.mod go.sum
git commit -m "Go upgrade"
git checkout -b go-upgrade-`git rev-parse --short HEAD`
git push --set-upstream origin go-upgrade-`git rev-parse --short HEAD`
- name: Create pull request
run: gh pr create -B main -H go-upgrade-`git rev-parse --short HEAD` --title "Go upgrade" --body "Scheduled PR created by Github action"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-rust:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
CI_COMMIT_AUTHOR: Github Action
CI_COMMIT_EMAIL: "[email protected]"
steps:
- uses: actions/checkout@v3
- name: Install cargo-edit
run: cargo install cargo-edit
- working-directory: test-jwt
run: cargo upgrade
- working-directory: test-jwt
run: cargo update
- name: Commit files
run: |
git config user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config user.email "${{ env.CI_COMMIT_EMAIL }}"
git add test-jwt/Cargo.toml test-jwt/Cargo.lock
git commit -m "Cargo upgrade"
git checkout -b cargo-upgrade-`git rev-parse --short HEAD`
git push --set-upstream origin cargo-upgrade-`git rev-parse --short HEAD`
- name: Create pull request
run: gh pr create -B main -H cargo-upgrade-`git rev-parse --short HEAD` --title "Cargo upgrade" --body "Scheduled PR created by Github action"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}