Skip to content

fixed? (probably) github workflow #1

fixed? (probably) github workflow

fixed? (probably) github workflow #1

Workflow file for this run

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
- name: Get current tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag dodancs/pdns-recursor:${{ env.RELEASE_VERSION }}
docker tag dodancs/pdns-recursor:${{ env.RELEASE_VERSION }} dodancs/pdns-recursor:latest
docker tag dodancs/pdns-recursor:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns-recursor:${{ env.RELEASE_VERSION }}
docker tag dodancs/pdns-recursor:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns-recursor:latest
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the Docker images
run: |
docker push dodancs/pdns-recursor:${{ env.RELEASE_VERSION }}
docker push dodancs/pdns-recursor:latest
docker push ghcr.io/dodancs/docker-pdns-recursor:${{ env.RELEASE_VERSION }}
docker push ghcr.io/dodancs/docker-pdns-recursor:latest