Build latest server versions #2690
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 latest server versions | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
inputs: | |
use_cache: | |
description: 'Use docker cache [cache/nocache]' | |
required: true | |
default: 'cache' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "docker" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Update dependencies | |
working-directory: ./build | |
run: npm i | |
- name: Extract cache | |
id: cache | |
shell: bash | |
run: | | |
echo "CACHE=${{ github.event.inputs.CACHE }}" >> $GITHUB_OUTPUT | |
- name: Build | |
run: | | |
export ACTIONS_CACHE_URL=$(echo "$ACTIONS_ID_TOKEN_REQUEST_URL" | grep -Po 'https://[^/]+/[^/]+/' | sed 's/pipelines/artifactcache/') | |
export ACTIONS_RUNTIME_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN | |
node ./build/index.js ${{ steps.version.outputs.CACHE }} | |
env: | |
FORCE_COLOR: 2 |