Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

chore(deps): update dependency tsx to v4.13.1 #1717

chore(deps): update dependency tsx to v4.13.1

chore(deps): update dependency tsx to v4.13.1 #1717

Workflow file for this run

name: PR checks
on:
pull_request:
permissions:
packages: write
actions: write
jobs:
docker:
name: Prepare Docker image
runs-on: ubuntu-22.04
outputs:
docker_image: ${{ steps.docker-image-tag.outputs.docker_image }}
steps:
- uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Determine Docker image name and tag
id: docker-image-tag
run: |
DOCKER_REPO_NAME=`echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]'`
DOCKER_CHECKSUM=`cat Dockerfile scripts/dot2svg.sh scripts/sphinx.sh | sha256sum | awk '{ print $1 }' | tr -d '\n'`
DOCKER_IMAGE=ghcr.io/${DOCKER_REPO_NAME}/builder:${DOCKER_CHECKSUM}
echo "docker_image=${DOCKER_IMAGE}" >> $GITHUB_OUTPUT
echo "DOCKER_IMAGE=${DOCKER_IMAGE}" >> $GITHUB_ENV
- name: Check if Docker image exists
id: check-docker-image
continue-on-error: true
env:
DOCKER_CLI_EXPERIMENTAL: enabled
run: docker manifest inspect ${{ env.DOCKER_IMAGE }}
- name: Build Docker image
if: steps.check-docker-image.outcome == 'failure'
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ env.DOCKER_IMAGE }}
push: true
build:
runs-on: ubuntu-22.04
needs: [docker]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Pull Docker image
run: |
docker pull ${{ needs.docker.outputs.docker_image }}
echo "DOCKER_IMAGE=${{ needs.docker.outputs.docker_image }}" >> $GITHUB_ENV
- name: Determine documentation release
run: |
echo "VERSION=${{ github.head_ref }}" >> $GITHUB_ENV
echo "RELEASE=${{ github.sha }}" >> $GITHUB_ENV
- name: Build docs
run: make html
- run: make check
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: asset-tracker-docs-${{ github.sha }}
path: build/html/
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: Install dependencies
run: npm ci --no-audit
- name: Compile TypeScript
run: npx tsc
- name: Test
run: npm test