Skip to content

Commit

Permalink
add workflows and owners
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Cook authored and irataxy committed Jan 13, 2023
1 parent e2eb0ea commit c27fd23
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/media-video-stitcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: media-video-stitcher
on:
push:
branches:
- main
paths:
- 'media/video-stitcher/**'
- '.github/workflows/media-video-stitcher.yaml'
pull_request:
paths:
- 'media/video-stitcher/**'
- '.github/workflows/media-video-stitcher.yaml'
pull_request_target:
types: [labeled]
paths:
- 'media/video-stitcher/**'
- '.github/workflows/media-video-stitcher.yaml'
schedule:
- cron: '0 0 * * 0'
jobs:
test:
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' }}
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- uses: actions/[email protected]
with:
ref: ${{github.event.pull_request.head.sha}}
- uses: 'google-github-actions/[email protected]'
with:
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
service_account: '[email protected]'
create_credentials_file: 'true'
access_token_lifetime: 600s
- uses: actions/[email protected]
with:
node-version: 16
- run: npm install
working-directory: media/video-stitcher
- run: npm test
working-directory: media/video-stitcher
env:
MOCHA_REPORTER_SUITENAME: media_video_stitcher
MOCHA_REPORTER_OUTPUT: media_video_stitcher_sponge_log.xml
MOCHA_REPORTER: xunit
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
name: 'actions:force-run',
owner: 'GoogleCloudPlatform',
repo: 'nodejs-docs-samples',
issue_number: context.payload.pull_request.number
});
} catch (e) {
if (!e.message.includes('Label does not exist')) {
throw e;
}
}
- if: ${{ github.event_name == 'schedule' && always() }}
run: |
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
chmod +x ./flakybot
./flakybot --repo GoogleCloudPlatform/nodejs-docs-samples --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
1 change: 1 addition & 0 deletions .github/workflows/workflows.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"healthcare/hl7v2",
"iam",
"kms",
"media/video-stitcher",
"mediatranslation",
"monitoring/opencensus",
"monitoring/prometheus",
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ vision @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/nodejs-samples-revi

# Self-service
retail @GoogleCloudPlatform/cloud-retail-team @GoogleCloudPlatform/nodejs-samples-reviewers
media @GoogleCloudPlatform/cloud-media-team @GoogleCloudPlatform/nodejs-samples-reviewers

0 comments on commit c27fd23

Please sign in to comment.