forked from faicker/dnscrypt-proxy-2-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.47 KB
/
docker-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build
on:
push:
workflow_dispatch:
inputs:
dnscrypt-proxy-release:
description: 'DNSCrypt Proxy Release'
required: true
env:
REGISTRY: docker.io
IMAGE_NAME: xtr0py/dnscrypt-proxy-2-docker
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
env:
DNSCRYPT_PROXY_VERSION: ${{ github.event.inputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup default version
run: echo "DNSCRYPT_PROXY_VERSION=2.1.5" >> $GITHUB_ENV
if: ${{ env.DNSCRYPT_PROXY_VERSION == '' }}
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1
# Login against a Docker registry except on PR
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/#-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
build-args: VERSION=${{ env.DNSCRYPT_PROXY_VERSION }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:testing,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DNSCRYPT_PROXY_VERSION }}
push: true