Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

ci: Add dependabot go-storage auto build support #139

Merged
merged 4 commits into from
Jul 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/go-storage-auto-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Dependabot go-storage auto build
on: pull_request_target

permissions:
pull-requests: write
contents: write
Comment on lines +2 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
on: pull_request_target
permissions:
pull-requests: write
contents: write
on: pull_request

is enough?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need Auto commit & push, so write is required.


jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Check dependency names
if: steps.metadata.outputs.dependency-names != 'go-storage'
run: exit 1

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: "1.15"

- name: Checkout repository
uses: actions/checkout@v2

- name: Auto build
run: make build

- name: Auto commit
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions