Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish docker image to DockerHub | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login, build, tag, and push image to DockerHub | |
env: | |
DOCKERHUB_API_USERNAME: ${{ secrets.DOCKERHUB_API_USERNAME }} | |
DOCKERHUB_API_TOKEN: ${{ secrets.DOCKERHUB_API_TOKEN }} | |
DOCKER_REPOSITORY: wallet-daemon | |
IMAGE_TAG: ${{ github.ref_name }} | |
run: | | |
docker login --username $DOCKERHUB_API_USERNAME --password $DOCKERHUB_API_TOKEN | |
docker build -t enjin/$DOCKER_REPOSITORY:$IMAGE_TAG . | |
docker push enjin/$DOCKER_REPOSITORY:$IMAGE_TAG | |
docker tag enjin/$DOCKER_REPOSITORY:$IMAGE_TAG enjin/$DOCKER_REPOSITORY:latest | |
docker push enjin/$DOCKER_REPOSITORY:latest |