Skip to content

Use a checksum rather than branch name to avoid invalid char failures #9

Use a checksum rather than branch name to avoid invalid char failures

Use a checksum rather than branch name to avoid invalid char failures #9

Workflow file for this run

name: "PREview: Create"
on:
pull_request:
types: [opened, reopened]
jobs:
create-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: mshick/add-pr-comment@v2
with:
message: |
**Starting creation of the PREview environment...**
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
- name: Obtain Bucket Name
uses: ./.github/actions/PREview-data
- name: Authenticate with Google Cloud
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{secrets.GCP_SERVICE_ACCOUNT}}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
- name: Create PReview bucket
run: gsutil mb gs://${BUCKET}
- name: Configure bucket for public access
run: gsutil iam ch allUsers:legacyObjectReader gs://${BUCKET}
- name: Configure bucket web properties
run: gsutil web set -m index.html -e 404.html gs://${BUCKET}
- uses: mshick/add-pr-comment@v2
if: success()
continue-on-error: true
with:
message: |
**PREview environment has been created at [${{ env.URL }}](${{ env.URL }})**
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
data:
uses: ./.github/actions/PREview-data

Check failure on line 43 in .github/workflows/PREview-create.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/PREview-create.yaml

Invalid workflow file

invalid value workflow reference: no version specified
build:
uses: ./.github/workflows/_build.yaml
with:
output_dir: build
secrets: inherit
deploy-update:
needs: [data, build]
uses: ./.github/workflows/_deploy.yaml
with:
src_dir: build
bucket: ${{ needs.data.outputs.bucket }}
secrets: inherit
notify:
runs-on: ubuntu-latest
needs: [deploy-update, data]
steps:
- uses: mshick/add-pr-comment@v2
if: success()
continue-on-error: true
with:
message: |
**PREview has been updated at ${{ needs.data.outputs.url }}**
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true