Update main.yml

pull/15/head
Laurence Luo 2024-06-17 14:28:02 +08:00 committed by GitHub
parent 8b1878c1a8
commit a247e262fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 10 deletions

View File

@ -9,8 +9,27 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
seeleo/mobaxterm-genkey
ghcr.io/lzcapp/mobaxterm-genkey
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
@ -30,12 +49,6 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE }}
-
name: Build and push
id: docker_build
@ -45,6 +58,4 @@ jobs:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/mobaxterm-genkey:latest
ghcr.io/${{ github.actor }}/mobaxterm-genkey:latest
tags: ${{ steps.meta.outputs.tags }}