Skip to content

Sync k6 core dependencies #28

Sync k6 core dependencies

Sync k6 core dependencies #28

name: Sync k6 core dependencies
on:
schedule:
- cron: 3 14 * * * # Every day at 3:14
workflow_dispatch: {}
jobs:
sync-k6-deps:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write # Push branch.
pull-requests: write # Create PR.
env:
GH_TOKEN: ${{ github.token }}
BRANCH_NAME: ci-sync-deps
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Sync dependencies
run: |
git checkout -b "$BRANCH_NAME"
./hack/depsync.sh
if [[ -z "$(git status --porcelain --untracked-files=no)" ]]; then
echo "Nothing to do"
exit 0
fi
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git commit -am "go.mod: sync dependencies with k6 core"
git push -f -u origin "$BRANCH_NAME"
gh pr create --fill --body-file depsync-pr-body.txt || true # It is okay to fail if a PR already exists.