Skip to content

Publish Docker dev image #117

Publish Docker dev image

Publish Docker dev image #117

name: Publish Docker dev image
on:
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ secrets.GH_REPO }}
token: ${{ secrets.GH_PAT }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'web/package.json'
check-latest: true
cache: 'yarn'
cache-dependency-path: 'web/yarn.lock'
- name: Build frontend
run: |
yarn install --frozen-lockfile --non-interactive
yarn quasar build
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
working-directory: ./web
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ghcr.io/vscodev/kikoeru:dev
- name: Prune untagged images
uses: actions/delete-package-versions@v5
with:
package-name: 'kikoeru'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'