generated from broadinstitute/golang-project-template
-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
fee02b6
commit f0a4b2f
Showing
9 changed files
with
45 additions
and
61 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
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 |
---|---|---|
|
@@ -26,14 +26,6 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/sherlock-build.yaml" | ||
- ".github/workflows/client-report-app-version.yaml" | ||
- ".github/workflows/client-report-workflow.yaml" | ||
- "sherlock/**" | ||
- "!sherlock/docs/**" | ||
- "go-shared/**" | ||
- "!**/*.md" | ||
workflow_dispatch: | ||
|
||
env: | ||
|
@@ -97,7 +89,6 @@ jobs: | |
go-version-file: sherlock/go.mod | ||
|
||
- name: Set up Node/NPM | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
@@ -118,12 +109,10 @@ jobs: | |
run: make document-pact-provider | ||
|
||
- name: Delete existing Go client library code | ||
if: ${{ github.event_name != 'pull_request' }} | ||
# Just delete code, not config, so that no-longer-generated files will disappear | ||
run: rm -rf sherlock-go-client/client | ||
|
||
- name: Generate Go client library | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
docker run --rm -e GOPATH=/go \ | ||
-v $(go env GOPATH):/go \ | ||
|
@@ -133,17 +122,14 @@ jobs: | |
generate client -f /local/sherlock/docs/swagger.json -A sherlock --default-scheme=https -m client/models -c client | ||
- name: Tidy Go client library dependencies | ||
if: ${{ github.event_name != 'pull_request' }} | ||
working-directory: sherlock-go-client | ||
run: go mod tidy | ||
|
||
- name: Delete existing Typescript client library code | ||
if: ${{ github.event_name != 'pull_request' }} | ||
# Just delete code, not config, so that no-longer-generated files will disappear | ||
run: rm -rf sherlock-typescript-client/src | ||
|
||
- name: Generate Typescript client library | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ | ||
-i /local/sherlock/docs/swagger.json \ | ||
|
@@ -157,7 +143,6 @@ jobs: | |
--additional-properties=npmVersion=${{ needs.generate-tag.outputs.tag }} | ||
- name: Build Typescript client | ||
if: ${{ github.event_name != 'pull_request' }} | ||
working-directory: sherlock-typescript-client | ||
run: | | ||
npm install --save-dev | ||
|
@@ -196,15 +181,6 @@ jobs: | |
with: | ||
image: us-central1-docker.pkg.dev/dsp-artifact-registry/sherlock/sherlock:${{ needs.generate-tag.outputs.tag }} | ||
|
||
- name: Auth to GCP | ||
id: auth | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider | ||
service_account: [email protected] | ||
|
||
- name: Commit changes | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
|
@@ -224,6 +200,15 @@ jobs: | |
git tag "go-shared/${{ needs.generate-tag.outputs.tag }}" | ||
git tag "sherlock-go-client/${{ needs.generate-tag.outputs.tag }}" | ||
- name: Auth to GCP | ||
id: auth | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider | ||
service_account: [email protected] | ||
|
||
- name: Push to main | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
|
7 changes: 0 additions & 7 deletions
7
.github/workflows/sherlock-api-diff.yaml → ...ub/workflows/sherlock-check-api-diff.yaml
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
18 changes: 1 addition & 17 deletions
18
.github/workflows/sherlock-lint.yaml → .github/workflows/sherlock-check-lint.yaml
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Ticket Check' | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
ticket-present: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Ticket Present in PR Title' | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
run: | | ||
echo "Checking for ticket in PR title..." | ||
if [[ "$PR_TITLE" =~ [A-Z]{2,}-[0-9]+ ]]; then | ||
echo "Ticket found in PR title!" | ||
exit 0 | ||
else | ||
echo "No ticket found in PR title!" | ||
exit 1 | ||
fi |
File renamed without changes.
File renamed without changes.