Bump express from 4.18.2 to 4.19.2 #59
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
name: build | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Build | |
run: | | |
yarn install | |
yarn run lint | |
yarn run build | |
- uses: actions/upload-artifact@v3 | |
if: github.event_name == 'push' && (github.ref_name == 'dev' || github.ref_type == 'tag') | |
with: | |
name: dist-${{ github.ref_name }} | |
path: dist | |
retention-days: 1 | |
docker: | |
runs-on: ubuntu-latest | |
needs: build | |
# Only publish dev branch and tags | |
if: github.event_name == 'push' && (github.ref_name == 'dev' || github.ref_type == 'tag') | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist-${{ github.ref_name }} | |
path: dist | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Define vars | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository }} | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref_name }}" | tr '[A-Z]' '[a-z]') | |
# Strip "v" prefix from tag name | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
# Use Docker `latest` tag convention | |
[ "$VERSION" == "dev" ] && VERSION=latest | |
echo "IMAGE_ID=$IMAGE_ID" | |
echo "VERSION=$VERSION" | |
# Register variables | |
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }} | |
platforms: linux/amd64,linux/arm64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |