Skip to content

ci: fix Dockerfile name #9

ci: fix Dockerfile name

ci: fix Dockerfile name #9

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- "v*"
env:
IMAGE_NAME: docker-doh
DOCKERHUB_IMAGE: showfom/doh-server
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Set version tag
run: echo "IMAGE_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
- name: Build images
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: ./Dockerfile.alpine
tags: |
"ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest"
"ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}"
"${{ env.DOCKERHUB_IMAGE }}:latest"
"${{ env.DOCKERHUB_IMAGE }}:${{ env.IMAGE_VERSION }}"