Skip to content

revert everything

revert everything #18

Workflow file for this run

name: Docker Build and Push
on:
push:
branches:
- "main"
release:
types: [published]
env:
IMAGE_REGISTRY: ghcr.io
IMAGE_NAMESPACE: andreygubarev
IMAGE_NAME: headscale
jobs:
build:
name: Build and push multi-arch image
runs-on: ubuntu-latest
strategy:
matrix:
platforms: [linux/amd64, linux/arm64]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine tags
id: get_tags
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
echo ::set-output name=TAG::"$VERSION"
else
echo ::set-output name=TAG::"latest"
fi
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: ${{ matrix.platforms }}
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ steps.get_tags.outputs.TAG }}