Skip to content

Commit

Permalink
Merge pull request #4 from B3zaleel/setup-publish-pipeline
Browse files Browse the repository at this point in the history
Create a job for publishing the project
  • Loading branch information
B3zaleel authored Apr 22, 2023
2 parents 853af18 + 94bdf95 commit c2dc381
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish Docker Image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker Image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log In to Docker Hub
uses: docker/login-action@v2
with:
username: b3zaleel
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract Metadata for Docker
id: metadata
uses: docker/metadata-action@v4
with:
images: b3zaleel/fractage
- name: Build and Push to Docker Hub
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

0 comments on commit c2dc381

Please sign in to comment.