123 #9
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: CI | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
# Runs a single command using the runners shell | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14.18.3' | |
# Runs a set of commands using the runners shell | |
- name: Install Dependencies | |
run: npm install | |
- name: Copy SqlLite | |
run: mkdir -p ./node_modules/sqlite3/lib/binding/ && cp -R package/* ./node_modules/sqlite3/lib/binding/ | |
- name: Build Release | |
run: npm run clean | npm run pkg | |
- name: Extract tag name | |
id: tag_name | |
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: "dist/**" | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Prepare Docker Tags | |
id: docker_tags | |
run: | | |
if [[ "${{ env.TAG }}" == *Beta* ]]; then | |
echo "::set-output name=tags::pilgrima/ffandown:${{ env.TAG }}" | |
else | |
echo "::set-output name=tags::pilgrima/ffandown:latest,pilgrima/ffandown:${{ env.TAG }}" | |
fi | |
- name: Build And Push Arm64 Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ | |
file: Dockerfile-linux-arm | |
push: true | |
platforms: linux/arm64/arm | |
tags: ${{ steps.docker_arm_tags.outputs.tags }} | |
- name: Prepare Arm Docker Tags | |
id: docker_arm_tags | |
run: | | |
if [[ "${{ env.TAG }}" == *Beta* ]]; then | |
echo "::set-output name=tags::pilgrima/ffandown:arm-${{ env.TAG }}" | |
else | |
echo "::set-output name=tags::pilgrima/ffandown:arm,pilgrima/ffandown:arm-${{ env.TAG }}" | |
fi | |