Add image-publish CI
This commit is contained in:
parent
c751d8814d
commit
b4626c377c
1 changed files with 38 additions and 0 deletions
38
.github/workflows/image-publish.yml
vendored
Normal file
38
.github/workflows/image-publish.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Build and Deploy to github packages
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
target:
|
||||
description: 'Target Branch, tag or SHA'
|
||||
required: true
|
||||
default: 'main'
|
||||
|
||||
jobs:
|
||||
buildx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/libremdb:latest
|
||||
ghcr.io/${{ github.repository_owner }}/libremdb:${{ github.event.inputs.target }}
|
||||
cache-from: type=registry,ref=user/app:latest
|
||||
cache-to: type=inline
|
Loading…
Add table
Reference in a new issue