chore(deps): update myrotvorets/node-build docker digest to f3812f7 #2533
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- '**:**' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
head_tag: ${{ steps.head_tag.outputs.head_tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Retrieve tags | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Check if Git tag exists | |
id: head_tag | |
run: echo "::set-output name=head_tag::$(git tag --points-at HEAD)" | |
if: startsWith(github.ref, 'refs/heads/') | |
build: | |
runs-on: ubuntu-latest | |
needs: prepare | |
if: ${{ !startsWith(github.ref, 'refs/heads/') || !needs.prepare.outputs.head_tag }} | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: lts/* | |
registry-url: https://npm.pkg.github.com | |
cache: npm | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run postinstall scripts | |
run: npm rebuild && npm run prepare --if-present | |
- name: Run tests | |
run: npm test | |
- name: Trigger Docker build | |
uses: myrotvorets/trigger-repository-dispatch-action@dcc1a8db8562d98f3e2f84802c4a77a772aefaa2 # v2.0.0 | |
with: | |
token: ${{ secrets.REPOSITORY_ACCESS_TOKEN }} | |
type: tests-passed | |
payload: '{ "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "event_name": "${{ github.event_name }}" }' |