v1.3.0 #225
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: 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 }} |