Skip to content

Commit

Permalink
chore: publish image to Docker Hub when a tag is released
Browse files Browse the repository at this point in the history
  • Loading branch information
birme authored and martinstark committed May 10, 2024
1 parent 9bfc503 commit 93cb163
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/run-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build image and push to Docker Hub

on:
release:
types: [released]

jobs:
push_to_registry:
name: Push Docker Image to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

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

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.HUB_DOCKER_USERNAME }}
password: ${{ secrets.HUB_DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: eyevinntechnology/intercom-frontend

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 93cb163

Please sign in to comment.