Skip to content

Commit 3204a77

Browse files
authored
chore: skip test fork, add label (#13)
* chore: skip test fork, add label * remove mono repo configs for release-please
1 parent d3a02f7 commit 3204a77

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

.github/workflows/deploy-cf-it.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
gcloud:
7+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
78
name: with setup-gcloud
89
runs-on: ubuntu-latest
910
steps:
@@ -40,6 +41,7 @@ jobs:
4041
CF_NAME: projects/${{ secrets.DEPLOY_CF_PROJECT_ID }}/locations/us-central1/functions/cf-http-gcloud-${{ github.run_number }}
4142

4243
b64_json:
44+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
4345
name: with base64 json creds
4446
runs-on: ubuntu-latest
4547
steps:
@@ -77,6 +79,7 @@ jobs:
7779
CF_NAME: projects/${{ secrets.DEPLOY_CF_PROJECT_ID }}/locations/us-central1/functions/cf-http-b64-${{ github.run_number }}
7880

7981
json:
82+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
8083
name: with json creds
8184
runs-on: ubuntu-latest
8285
steps:
@@ -116,6 +119,7 @@ jobs:
116119
CF_REGION: us-east1
117120

118121
json-event-trigger:
122+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
119123
name: test event trigger
120124
runs-on: ubuntu-latest
121125
steps:

.github/workflows/label.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: pull_request_target
2+
3+
jobs:
4+
apply-label:
5+
if: github.event.pull_request.head.repo.full_name != github.repository
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/github-script@v3
9+
with:
10+
github-token: ${{secrets.GITHUB_TOKEN}}
11+
script: |
12+
github.issues.addLabels({
13+
issue_number: context.issue.number,
14+
owner: context.repo.owner,
15+
repo: context.repo.repo,
16+
labels: ['Fork']
17+
})

.github/workflows/release-please.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ jobs:
6666
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
6767
release-type: node
6868
fork: true
69+
bump-minor-pre-major: true
6970
package-name: ${{env.ACTION_NAME}}
70-
path: ${{env.ACTION_NAME}}
71-
monorepo-tags: ${{env.ACTION_NAME}}
7271
command: release-pr
7372
release-please-release:
7473
runs-on: ubuntu-latest
@@ -79,6 +78,5 @@ jobs:
7978
token: ${{ secrets.GITHUB_TOKEN }}
8079
release-type: node
8180
package-name: ${{env.ACTION_NAME}}
82-
path: ${{env.ACTION_NAME}}
83-
monorepo-tags: ${{env.ACTION_NAME}}
81+
bump-minor-pre-major: true
8482
command: github-release

tests/cloudFunctionClient.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ describe('CloudFunction', function () {
2929
});
3030

3131
it('initializes with ADC', async function () {
32+
if (
33+
!process.env.GOOGLE_APPLICATION_CREDENTIALS ||
34+
!process.env.GCLOUD_PROJECT
35+
) {
36+
this.skip();
37+
}
3238
const client = new CloudFunctionClient(region);
3339
expect(client.auth.jsonContent).eql(null);
3440
const auth = (await client.getAuthClient()) as JWT;

0 commit comments

Comments
 (0)