-
Notifications
You must be signed in to change notification settings - Fork 6
Create PR for golangupx release #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
62bfcca
cba99fb
25dc62f
1f4aa5a
33f8e75
2547e85
5baebdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ jobs: | |
| }); | ||
| } | ||
|
|
||
| commit: | ||
| create_pr: | ||
| needs: check-golang-version | ||
| if: needs.check-golang-version.outputs.new-version == 'true' | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -101,10 +101,21 @@ jobs: | |
| sed -i "s/go-version: '[0-9]\+\.[0-9]\+\.[0-9]'/go-version: '${NEW_VERSION}'/" .github/workflows/release_build.yml | ||
| echo "Updated release_build.yml Go version ${NEW_VERSION}" | ||
|
|
||
| - name: Commit updated files | ||
| - name: Create Pull Request | ||
| if: github.event_name != 'pull_request' | ||
| run: | | ||
| set -x | ||
| git branch golangupx_new_release | ||
aminvakil marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| git switch golangupx_new_release | ||
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "github-actions[bot]" | ||
| git add Dockerfile go.mod .github/workflows/release_build.yml | ||
| git commit -m "chore: update Golang upx to version ${{ needs.check-golang-version.outputs.version }}" || echo "No changes to commit" | ||
| git push || echo "No changes to push" | ||
| git commit -m "chore: update Golang upx to version ${{ needs.check-golang-version.outputs.version }}" | ||
| git push --force -u origin golangupx_new_release | ||
|
||
| PR_NUMBER=$(gh pr list --head golangupx_new_release --json number --jq '.[0].number') | ||
|
||
| if [ ! -n "${PR_NUMBER}" ]; then | ||
| gh pr create --fill | ||
| gh pr list --head golangupx_new_release --json number --jq '.[0].number' | ||
| fi | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be deleted later.