-
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.
senzing-factory/build-resources#15 update go workflow permissions (#40)
- Loading branch information
Showing
19 changed files
with
151 additions
and
110 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 |
---|---|---|
@@ -1,21 +1,14 @@ | ||
name: add-to-project-garage-dependabot.yaml | ||
name: 'add to project garage dependabot' | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
env: | ||
CREATOR: ${{ github.event.pull_request.user.login }} | ||
branches: [main] | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add dependabot pull request to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Assign pull request to project | ||
env: | ||
BOOL: ${{ contains( env.CREATOR, 'dependabot' ) }} | ||
if: ${{ env.BOOL == 'true' }} | ||
uses: actions/add-to-project@v0.5.0 | ||
with: | ||
project-url: https://github.com/orgs/senzing-garage/projects/3 | ||
github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} | ||
|
||
add-to-project-dependabot: | ||
secrets: | ||
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }} | ||
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@main | ||
with: | ||
project: ${{ vars.SENZING_PROJECT_GARAGE }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
name: dependabot-approve-and-merge.yaml | ||
name: 'dependabot approve and merge' | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
dependabot-approve-and-merge: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
uses: senzing-factory/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@main | ||
secrets: | ||
SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN: ${{ secrets.SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN }} | ||
uses: senzing-factory/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@v1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
# Based on | ||
# - https://github.com/marketplace/actions/setup-go-environment | ||
name: 'go test linux' | ||
|
||
name: go-test-linux.yaml | ||
on: [push] | ||
|
||
env: | ||
LD_LIBRARY_PATH: /opt/senzing/g2/lib | ||
SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@/tmp/sqlite/G2C.db" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
go-test-linux: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
go: ["1.21"] | ||
os: [ubuntu-latest] | ||
senzingapi-version: [staging] | ||
senzingapi-version: [latest] | ||
name: "go test with Senzing: ${{ matrix.senzingapi-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Install Senzing API | ||
uses: Senzing/github-action-install-senzing-api@latest | ||
with: | ||
senzingapi-version: ${{ matrix.senzingapi-version }} | ||
|
||
- name: Copy /etc files | ||
run: sudo cp testdata/senzing-license/g2.lic /etc/opt/senzing/g2.lic | ||
|
||
- name: Copy test database files | ||
run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db | ||
|
||
- name: Run go test | ||
run: go test -v -p 1 ./... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
name: gofmt.yaml | ||
name: 'gofmt' | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
gofmt: | ||
uses: senzing-factory/build-resources/.github/workflows/gofmt.yaml@main | ||
uses: senzing-factory/build-resources/.github/workflows/gofmt.yaml@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
name: make-go-github-file.yaml | ||
name: 'make go github file' | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
permissions: write-all | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
make-go-github-file: | ||
uses: senzing-factory/build-resources/.github/workflows/make-go-github-file.yaml@main | ||
uses: senzing-factory/build-resources/.github/workflows/make-go-github-file.yaml@v1 | ||
secrets: | ||
SENZING_GITHUB_GPG_PRIVATE_KEY: ${{ secrets.SENZING_GITHUB_GPG_PRIVATE_KEY }} | ||
SENZING_GITHUB_GPG_PASSPHRASE: ${{ secrets.SENZING_GITHUB_GPG_PASSPHRASE }} | ||
SENZING_GITHUB_ACTOR: ${{ secrets.SENZING_GITHUB_ACTOR }} | ||
SENZING_GITHUB_GPG_PASSPHRASE: ${{ secrets.SENZING_GITHUB_GPG_PASSPHRASE }} | ||
SENZING_GITHUB_GPG_PRIVATE_KEY: ${{ secrets.SENZING_GITHUB_GPG_PRIVATE_KEY }} |
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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
name: make-go-tag.yaml | ||
name: 'make go tag' | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
permissions: write-all | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
make-go-tag: | ||
name: Make a vM.m.P tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Make go version tag | ||
uses: senzing-factory/github-action-make-go-tag@main | ||
uses: senzing-factory/github-action-make-go-tag@v1 |
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
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
Oops, something went wrong.