forked from coreos/fedora-coreos-docs
-
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.
workflows/update-versions: create PR instead
We can't push directly to main because of branch protection, and we can't bypass branch protection without allowing anyone with push access to the repo to do the same (by modifying a workflow). Just create a PR instead.
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 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 |
---|---|---|
|
@@ -16,15 +16,22 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Update versions | ||
run: ci/update-versions.py | ||
- name: Create commit | ||
run: | | ||
git config user.name 'CoreOS Bot' | ||
git config user.email [email protected] | ||
ci/update-versions.py | ||
- name: Commit and push | ||
run: | | ||
if ! git diff --quiet --exit-code; then | ||
git commit -am "site: update software versions ✨" \ | ||
-m "Triggered by update-versions GitHub Action." | ||
# this bypasses CI due to GitHub recursion prevention | ||
git push | ||
fi | ||
- name: Open pull request | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.COREOSBOT_RELENG_TOKEN }} | ||
branch: update-versions | ||
push-to-fork: coreosbot-releng/fedora-coreos-docs | ||
title: "site: update software versions ✨" | ||
body: "Created by update-versions [GitHub workflow](${{ github.server_url }}/${{ github.repository }}/actions/workflows/update-versions.yml) ([source](${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/update-versions.yml))." | ||
committer: "CoreOS Bot <[email protected]>" | ||
author: "CoreOS Bot <[email protected]>" |