Skip to content

Pin GitHub Actions to full-length commit SHAs #191

Pin GitHub Actions to full-length commit SHAs

Pin GitHub Actions to full-length commit SHAs #191

Workflow file for this run

# This is a workflow that runs on PR builds.
name: "PR build"
# Controls when the action will run.
on:
# Triggers the workflow on pull request events for the master branch
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2.8.0
# Sets up Node and an .npmrc file. This is the official Github supported way to set up node.
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
cache: "yarn"
always-auth: "true"
- name: Install packages
run: yarn install --immutable
- name: Set Firefox Env Variable
run: export FIREFOX_BIN=$(which firefox)
- name: Set Chrome Env Variable
run: export CHROME_BIN=$(which chrome)
- name: Print environment variables
run: echo "CHROME_BIN = $CHROME_BIN FIREFOX_BIN = $FIREFOX_BIN"
- name: CI BUILD + UT
run: yarn build && yarn test
- name: Check whether version was bumped in PR
id: actions_project_version_check
uses: "thomastay/actions-project-version-check@64236a4a27a9f75e576ba956d0399d4fbafce381" # v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
file-to-check: package.json
fail-build-if-not-bumped: true
target-branch: master