Skip to content

Merge pull request #5 from Akelio-zhang/patch-1 #15

Merge pull request #5 from Akelio-zhang/patch-1

Merge pull request #5 from Akelio-zhang/patch-1 #15

Workflow file for this run

name: 'publish doumark'
on:
workflow_dispatch:
push:
branches:
- master
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-node@v3
with:
node-version: 20
- id: build
name: Build execute binary
run: |
npm ci
npm run build
version=$(node -e "console.log(require('./package.json').version)")
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push alpine
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
lizheming/drone-doumark:latest
lizheming/drone-doumark:${{ steps.build.outputs.version }}