Skip to content

Commit

Permalink
ci: configure needs
Browse files Browse the repository at this point in the history
  • Loading branch information
imaegoo committed Sep 4, 2023
1 parent c52bf1b commit 6fc2baa
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 56 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/docker-image.yml

This file was deleted.

46 changes: 43 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish

on:
Expand Down Expand Up @@ -51,3 +48,46 @@ jobs:
run: cd src/server/self-hosted && yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
publish-docker:
needs: publish-npm
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Get twikoo:latest version
run: echo "TWIKOO_LATEST_VERSION=$(npm view twikoo@latest version)" >> "$GITHUB_ENV"
-
name: Build and push amd64 image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
imaegoo/twikoo:latest
imaegoo/twikoo:${{ env.TWIKOO_LATEST_VERSION }}
-
name: Build and push arm32v7 image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm/v7
push: true
tags: |
imaegoo/twikoo:arm32v7
imaegoo/twikoo:${{ env.TWIKOO_LATEST_VERSION }}-arm32v7
build-args: NODE_IMAGE=arm32v7/node

0 comments on commit 6fc2baa

Please sign in to comment.