-
-
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.
* Delete not allowed file: .github/workflows/codeql-analysis.yml * Add new file: .github/workflows/build-test.yml * Add new file: .github/workflows/unit-test.yml * Add new file: .github/workflows/auto-merge.yml
- Loading branch information
1 parent
db84362
commit ac12531
Showing
4 changed files
with
83 additions
and
73 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Dependabot Auto Build | ||
on: pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
metadata: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
dependency-names: ${{ steps.metadata.outputs.dependency-names }} | ||
steps: | ||
- name: Dependabot metadata | ||
uses: Xuanwo/[email protected] | ||
id: metadata | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
dependabot: | ||
needs: metadata | ||
if: ${{ needs.metadata.outputs.dependency-names != '' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.16" | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.ROBOT_GITHUB_TOKEN }} | ||
|
||
- name: Auto build | ||
run: make build | ||
|
||
- name: Auto commit | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
if: ${{contains(needs.metadata.outputs.dependency-names, 'github.com/beyondstorage/go-storage/v4')}} | ||
with: | ||
commit_message: Auto build to generate code | ||
|
||
- name: Auto merge | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.ROBOT_GITHUB_TOKEN }} | ||
|
||
- name: Auto approve | ||
run: gh pr review "$PR_URL" -a | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.ROBOT_GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "Build Test" | ||
|
||
on: [ push,pull_request ] | ||
|
||
jobs: | ||
build_test: | ||
name: Build Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.16" | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Format | ||
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Git Diff | ||
run: if [ "$(git diff | wc -l)" -gt 0 ]; then exit 1; fi |
This file was deleted.
Oops, something went wrong.
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