Skip to content

🐋 DockerHub Push

🐋 DockerHub Push #3

name: 🐋 DockerHub Push
on:
workflow_run:
workflows: ["🎉 Release"]
types:
- completed
workflow_dispatch:
jobs:
push:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Get Github tag
id: meta
run: |
curl --silent "https://api.github.com/repos/hueristiq/xsubfind3r/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT
-
name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: hueristiq/xsubfind3r:latest,hueristiq/xsubfind3r:${{ steps.meta.outputs.TAG }}