👷 Add Automerge to CI/CD
This commit is contained in:
parent
26ade08c6b
commit
12685d0ff6
3 changed files with 30 additions and 9 deletions
31
.github/workflows/integration.yaml
vendored
31
.github/workflows/integration.yaml
vendored
|
@ -4,19 +4,19 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.17.x'
|
||||
go-version: "1.17.x"
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v3
|
||||
|
@ -36,7 +36,7 @@ jobs:
|
|||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
needs:
|
||||
- test
|
||||
steps:
|
||||
|
@ -45,7 +45,7 @@ jobs:
|
|||
- name: Setup go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.17.x'
|
||||
go-version: "1.17.x"
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v3
|
||||
|
@ -62,3 +62,24 @@ jobs:
|
|||
|
||||
- name: Docker
|
||||
run: docker build .
|
||||
|
||||
automerge:
|
||||
name: Merge Automatically
|
||||
needs: [test, build]
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Obtain Access Token
|
||||
id: acces_token
|
||||
run: |
|
||||
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.SYSTEMLI_APP_CREDENTIALS_TOKEN }})"
|
||||
echo "token=$TOKEN" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Merge
|
||||
uses: fastify/github-action-merge-dependabot@v3
|
||||
with:
|
||||
github-token: ${{ steps.acces_token.outputs.token }}
|
||||
|
|
4
.github/workflows/quality.yaml
vendored
4
.github/workflows/quality.yaml
vendored
|
@ -4,12 +4,12 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: GolangCI
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: GolangCI
|
||||
|
|
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
@ -7,7 +7,7 @@ on:
|
|||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
@ -15,7 +15,7 @@ jobs:
|
|||
- name: Setup go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.17.x'
|
||||
go-version: "1.17.x"
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@v3
|
||||
|
|
Loading…
Reference in a new issue