Skip to content

Use python3 package from apk to speed up - SSL works now for some reason #3

Use python3 package from apk to speed up - SSL works now for some reason

Use python3 package from apk to speed up - SSL works now for some reason #3

Workflow file for this run

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Get current tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Get current tag
run: echo "RELEASE_VERSION_1=$(echo ${{ env.RELEASE_VERSION }} | cut '.' -f1)" >> $GITHUB_ENV
- name: Get current tag
run: echo "RELEASE_VERSION_2=$(echo ${{ env.RELEASE_VERSION }} | cut '.' -f1,2)" >> $GITHUB_ENV
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag dodancs/pdns:${{ env.RELEASE_VERSION }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} dodancs/pdns:${{ env.RELEASE_VERSION_1 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} dodancs/pdns:${{ env.RELEASE_VERSION_2 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} dodancs/pdns:latest
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_1 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_2 }}
docker tag dodancs/pdns:${{ env.RELEASE_VERSION }} ghcr.io/dodancs/docker-pdns: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:${{ env.RELEASE_VERSION }}
docker push dodancs/pdns:${{ env.RELEASE_VERSION_1 }}
docker push dodancs/pdns:${{ env.RELEASE_VERSION_2 }}
docker push dodancs/pdns:latest
docker push ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION }}
docker push ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_1 }}
docker push ghcr.io/dodancs/docker-pdns:${{ env.RELEASE_VERSION_2 }}
docker push ghcr.io/dodancs/docker-pdns:latest