-
Notifications
You must be signed in to change notification settings - Fork 607
69 lines (54 loc) · 1.77 KB
/
backstop-sanity-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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