Skip to content

Docker Push

Docker Push #200

Workflow file for this run

name: docker push
on:
release:
types: [published]
permissions:
contents: read
jobs:
dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
docker build --build-arg VERSION=${{ github.event.release.tag_name }} . --file Dockerfile -t go-dnscollector
- name: Tag image
run: |
docker tag go-dnscollector dmachard/go-dnscollector:${{ github.event.release.tag_name }}
docker tag go-dnscollector dmachard/go-dnscollector:latest
- name: Upload to DockerHub
run: |
docker login -u ${{ secrets.DOCKERHUB_LOGIN }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
docker push dmachard/go-dnscollector:latest
docker push dmachard/go-dnscollector:${{ github.event.release.tag_name }}