Skip to content

Commit

Permalink
ci: Automatically push new Docker image on a new release
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Mar 25, 2024
1 parent f0d8ab0 commit 6fa943a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/push-docker-image-to-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Push Docker Image to Docker Hub

on:
release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: |
lelefan/observatoireproduits:latest
lelefan/observatoireproduits:${{ github.event.release.tag_name }}

0 comments on commit 6fa943a

Please sign in to comment.