Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLLamb committed Sep 1, 2023
1 parent 3c76b98 commit 930fc6b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request'
if: github.repository_owner == 'SMPTE' && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request')
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
Expand All @@ -24,14 +24,13 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
submodules: true

- name: Set repository name
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV

- name: Check out all branches with the exception of the current branch
run: CUR_BRANCH=$(git rev-parse --abbrev-ref HEAD); for i in `git branch -a | grep remote | grep -v HEAD | grep -v ${CUR_BRANCH}`; do git branch --track ${i#remotes/origin/} $i; done
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

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
Expand All @@ -44,7 +43,7 @@ jobs:
if: github.repository != 'SMPTE/html-pub'
with:
AWS_S3_REGION: ${{env.AWS_REGION}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/"
CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -54,7 +53,7 @@ jobs:
if: github.repository == 'SMPTE/html-pub'
with:
AWS_S3_REGION: ${{env.AWS_REGION}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_BUCKET: ${{env.AWS_S3_BUCKET}}
AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/"
CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 930fc6b

Please sign in to comment.