Skip to content

Commit 26cccc7

Browse files
committed
bump tooling and workflows
1 parent e2de6c8 commit 26cccc7

2 files changed

Lines changed: 6 additions & 69 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,77 +6,14 @@ on:
66
release:
77
types: [published]
88

9-
env:
10-
AWS_REGION: us-east-1
11-
AWS_S3_BUCKET: html-doc-pub
12-
AWS_ROLE: arn:aws:iam::189079736792:role/gh-actions-html-pub
13-
CANONICAL_LINK_PREFIX: https://doc.smpte-doc.org/
14-
159
jobs:
1610
build:
17-
runs-on: ubuntu-latest
18-
if: >
19-
github.repository_owner == 'SMPTE' && (
20-
(github.event_name == 'push' && github.ref == 'refs/heads/main')
21-
|| github.event_name == 'pull_request'
22-
|| github.event_name == 'release'
23-
)
24-
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
2511
permissions:
2612
id-token: write
2713
contents: write
2814
pull-requests: write
29-
30-
steps:
31-
32-
- name: Checkout repo
33-
uses: actions/checkout@v3
34-
with:
35-
fetch-depth: 0
36-
submodules: true
37-
38-
- name: Set repository name
39-
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
40-
41-
- name: Check out all branches with the exception of the current branch
42-
run: CUR_BRANCH=$(git rev-parse --abbrev-ref HEAD); for i in `git branch -a | grep remote | grep -v "remotes/pull" | grep -v HEAD | grep -v ${CUR_BRANCH}`; do git branch --track ${i#remotes/origin/} $i; done
43-
44-
- name: Configure AWS Credentials
45-
uses: aws-actions/configure-aws-credentials@v1-node16
46-
with:
47-
role-to-assume: ${{ env.AWS_ROLE }}
48-
aws-region: ${{ env.AWS_REGION }}
49-
50-
- name: Build and deploy document (local)
51-
uses: ./tooling/workflows
52-
if: github.repository != 'SMPTE/html-pub'
53-
with:
54-
AWS_S3_REGION: ${{env.AWS_REGION}}
55-
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
56-
AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/"
57-
CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}}
58-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
59-
PUBLIC_REPO_PAT: ${{secrets.PUBLIC_REPO_PAT}}
60-
61-
- name: Build and deploy document (HTML Pub repo)
62-
uses: ./workflows
63-
if: github.repository == 'SMPTE/html-pub'
64-
with:
65-
AWS_S3_REGION: ${{env.AWS_REGION}}
66-
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
67-
AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/"
68-
CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}}
69-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
70-
PUBLIC_REPO_PAT: ${{secrets.PUBLIC_REPO_PAT}}
71-
72-
- name: Notify template repo to update submodule
73-
if: github.event_name == 'release' && github.repository == 'SMPTE/html-pub'
74-
env:
75-
GH_TOKEN: ${{ secrets.TEMPLATE_REPO_PAT }}
76-
TAG_NAME: ${{ github.event.release.tag_name }}
77-
run: |
78-
gh api repos/SMPTE/html-pub-template/dispatches \
79-
--method POST \
80-
--field event_type=tooling-release \
81-
--field "client_payload[tag]=${TAG_NAME}" \
82-
--field "client_payload[sha]=${GITHUB_SHA}"
15+
# Central build pipeline lives in html-pub. The build/validation code still
16+
# comes from this repo's `tooling` submodule, pinned by its SHA. Bump the
17+
# @ref to move to a new pipeline version.
18+
uses: SMPTE/html-pub/.github/workflows/build-reusable.yml@main
19+
secrets: inherit

0 commit comments

Comments
 (0)