Skip to content

Merge pull request #69 from moffatman/main #14

Merge pull request #69 from moffatman/main

Merge pull request #69 from moffatman/main #14

Workflow file for this run

on:
workflow_dispatch:
push:
tags:
- 'v*'
name: Build and release
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: docker://golang:1.17
with:
args: make all
# apparently github auto-mounts dirs so no volumes needed
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "bin/*"
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: tags
run: |
export TAG=unifiedpush/common-proxies:latest,unifiedpush/common-proxies:$(git describe --tags),unifiedpush/common-proxies:$(git describe --tags | cut -d '.' -f -2)
echo "::set-output name=tag::$TAG"
id: tags
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
#armv5 not supported by this qemu and v6 not supported by debian golang so 7 is most recent
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
push: true
tags: ${{ steps.tags.outputs.tag }}