Skip to content

updating to remove some noise #77

updating to remove some noise

updating to remove some noise #77

name: Build
on:
push:
branches: [ master, testing ]
workflow_dispatch:
inputs:
dnscrypt_proxy_release:
description: "DNSCrypt Proxy Release (blank = use DNSCRYPT_PROXY_VERSION file)"
required: false
env:
REGISTRY: docker.io
IMAGE_NAME: xtr0py/dnscrypt-proxy-2-docker
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Determine DNSCrypt version
id: ver
shell: bash
run: |
VERSION="${{ github.event.inputs.dnscrypt_proxy_release }}"
if [ -z "$VERSION" ]; then
VERSION="$(cat DNSCRYPT_PROXY_VERSION)"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Compute Docker tags
id: tags
shell: bash
run: |
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
VERSION="${{ steps.ver.outputs.version }}"
if [ "${{ github.ref_name }}" = "master" ]; then
# Release tags
TAGS="$IMAGE:$VERSION,$IMAGE:latest"
elif [ "${{ github.ref_name }}" = "testing" ]; then
# Testing tags
TAGS="$IMAGE:testing,$IMAGE:testing-$VERSION"
else
# Shouldn't happen due to branch filter, but safe fallback
TAGS="$IMAGE:$VERSION"
fi
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
build-args: RELEASE_TAG=${{ steps.ver.outputs.version }}
tags: ${{ steps.tags.outputs.tags }}
push: true