Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
amphineko authored Jan 10, 2024
1 parent e3ad8c6 commit b86ccae
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Docker image

on:
push:
branches:
- master
tags:
- "v*.*.*"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: login to ghcr.io
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: populate docker meta
id: docker-meta
uses: docker/metadata-action@v5.5.0
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=push
type=sha
- name: setup qemu
uses: docker/setup-qemu-action@v3.0.0

- name: setup docker buildx
uses: docker/setup-buildx-action@v3.0.0

- name: build and push
uses: docker/build-push-action@v2.6.0
with:
context: "."
push: true
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7

0 comments on commit b86ccae

Please sign in to comment.