Skip to content

Commit

Permalink
build and push to docker on version tag and tag image #12
Browse files Browse the repository at this point in the history
  • Loading branch information
bairhys committed Jul 16, 2024
1 parent 582d8e5 commit 3c6fe88
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,37 @@ name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]


tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/test-prometheus-frigate-exporter
tags: type=semver,pattern={{version}}

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

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

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/prometheus-frigate-exporter:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 3c6fe88

Please sign in to comment.