name: Backstop Sanity Docker on: workflow_dispatch: workflow_call: permissions: actions: write checks: write contents: write pull-requests: write packages: write env: NODE_VERSION: 20 # BRANCH_NAME: ${{ github.event.pull_request.head_ref || github.event.pull_request.head.ref_name || github.head_ref || github.ref_name }} # REGISTRY: ghcr.io # IMAGE_NAME: ${{ github.repository }} jobs: sanity-puppeteer-docker: name: 🤪 Puppeteer-On-Docker runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} run: echo "USERNAME=${secrets.DOCKERHUB_USERNAME}" >>${GITHUB_ENV} echo "USERNAME=${secrets.DOCKERHUB_TOKEN}" >>${GITHUB_ENV} - name: Set Name and Tag Vars env: name: "${{ env.BRANCH_NAME }}" run: | echo "IMAGE_NAME_LC=${IMAGE_NAME,,}" >>${GITHUB_ENV} echo "TAG=${name/\//-}" >> $GITHUB_ENV echo "PV=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV echo "PLAYWRIGHT_VERSION=$(cat package.json | jq -r '.dependencies.playwright')" >> $GITHUB_ENV - name: ⬢ Setup Node & Cache uses: actions/setup-node@v4 with: cache: "npm" cache-dependency-path: package-lock.json - name: ↧ Install run: npm ci - name: "𓋏 Run `npm run sanity-test-docker`" run: | npm run sanity-test-docker