-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open PR for versions update in github actions
This move the steps that commit a version update into a separate action, which commits to a new branch on opens a PR. This is because github actions can't push to main directly.
- Loading branch information
Dominik Piatek
committed
Aug 5, 2022
1 parent
0f6bdec
commit bb9aa3d
Showing
3 changed files
with
22 additions
and
8 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 |
---|---|---|
|
@@ -11,10 +11,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
permissions: | ||
contents: "write" | ||
pull-requests: "write" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: "main" | ||
- name: "Get latest tag" | ||
id: latesttag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.0 | ||
|
@@ -27,7 +31,9 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Github Action" | ||
TAG=$(git describe --abbrev=0) | ||
./scripts/update-preview.sh $TAG | ||
git push https://${{ secrets.REGISTRY_TOKEN }}@github.com/ably/ably-ui.git | ||
./scripts/update-versions.sh ${{ steps.previoustag.outputs.tag }} | ||
shell: bash | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
branch: update-versions-to-${{ ${{ steps.previoustag.outputs.tag }}}} |
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
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