Skip to content

Commit

Permalink
ci: add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rornic committed May 3, 2024
1 parent dd23b17 commit c1a353e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish

on:
push:
tags:
- 'v*'

jobs:
docker-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
rornic/starling-exporter
tags: |
type=semver,pattern={{version}}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v6
context: .
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit c1a353e

Please sign in to comment.