Skip to content

Commit

Permalink
fix: Push to main. (#93)
Browse files Browse the repository at this point in the history
* Commitlint can only run as part of a PR
* Put verifying and generating the readmes back where they were.
  It doesn't seem right, but that's how other repos do it.
  • Loading branch information
schwern authored Feb 10, 2023
1 parent ec4b262 commit 3f00f80
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: On pull request or push to main
name: On pull request
on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Commitlint and Other Shared Build Steps
uses: momentohq/standards-and-practices/github-actions/shared-build@gh-actions-v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

readme:
runs-on: ubuntu-latest
steps:
Expand All @@ -23,7 +29,6 @@ jobs:
usage_example_path: ./examples/main.go

test:
needs: [readme]
uses: ./.github/workflows/test.yml
secrets:
auth-token: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: On push to main
on:
push:
branches: [main]

jobs:
readme:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v3
with:
token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }}

- name: Generate README
uses: momentohq/standards-and-practices/github-actions/generate-and-commit-oss-readme@gh-actions-v1
with:
project_status: official
project_stability: alpha
project_type: sdk
sdk_language: Go
usage_example_path: ./examples/main.go

test:
needs: [readme]
uses: ./.github/workflows/test.yml
secrets:
auth-token: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
github-token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }}
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ jobs:
with:
token: ${{ secrets.github-token }}


- name: Commitlint and Other Shared Build Steps
uses: momentohq/standards-and-practices/github-actions/shared-build@gh-actions-v1
env:
GITHUB_TOKEN: ${{ secrets.github-token }}

- name: Install Go
uses: actions/setup-go@v3
with:
Expand Down

0 comments on commit 3f00f80

Please sign in to comment.