Bump @types/prismjs from 1.26.1 to 1.26.3 #311
Workflow file for this run
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: build | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '*.*' | |
release: | |
types: | |
- published | |
env: | |
IMAGE_NAME: git-json-editor | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build --if-present | |
#- run: npm test | |
- name: Docker Build | |
run: docker build -t "$IMAGE_NAME" --label "runnumber=${GITHUB_RUN_ID}" . | |
- name: Log in to GitHub Container Registry | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ env.GITHUB_TOKEN }} | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin | |
- name: Push image to GitHub Container Registry | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ env.GITHUB_TOKEN }} | |
run: | | |
IMAGE_ID="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME" | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[A-Z]' '[a-z]') | |
if [[ '${{ github.event_name }}' == 'release' ]]; then | |
# Set tags to `latest` | |
TAGS=(latest) | |
# Strip git ref prefix from version | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tag name | |
[[ '${{ github.ref }}' =~ ^refs/tags/v[0-9]+\.[0-9] ]] && VERSION=$(echo "$VERSION" | sed -e 's/^v//') | |
# Add version to tags | |
[[ "$VERSION" != "main" ]] && TAGS+=("$VERSION") | |
else | |
# Set tags to commit hash | |
TAGS=("${GITHUB_SHA::8}") | |
fi | |
for TAG in "${TAGS[@]}"; do docker tag "$IMAGE_NAME" "$IMAGE_ID:$TAG"; done | |
for TAG in "${TAGS[@]}"; do docker push "$IMAGE_ID:$TAG"; done |