Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

fix(deps): update dependency @discordjs/builders to v1 #1009

fix(deps): update dependency @discordjs/builders to v1

fix(deps): update dependency @discordjs/builders to v1 #1009

Workflow file for this run

name: Build
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Parse package.json
id: package-json
run: |
CONTENT=$(cat package.json)
CONTENT="${CONTENT//'%'/'%25'}"
CONTENT="${CONTENT//$'\n'/'%0A'}"
CONTENT="${CONTENT//$'\r'/'%0D'}"
echo "::set-output name=packageJson::$CONTENT"
- name: Set Environment Variables
run: |
IMG=krlist-stats
OWNER="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
echo "IMG=${IMG}" >> $GITHUB_ENV
echo "IMAGE=ghcr.io/${OWNER}/${IMG}" >> $GITHUB_ENV
echo "VERSION=${{ fromJSON(steps.package-json.outputs.packageJson).version }}" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.IMAGE }}
flavor: latest=${{ github.ref == 'refs/heads/main' }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}},value=v${{ env.VERSION }}
type=raw,value={{sha}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ env.VERSION }}
REVISION=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache