diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..8e592bc --- /dev/null +++ b/.github/workflows/publish.yaml @@ -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 }}