Skip to content

Merge pull request #141 from jertel/jertel/p312 #92

Merge pull request #141 from jertel/jertel/p312

Merge pull request #141 from jertel/jertel/p312 #92

Workflow file for this run

name: 'Build'
on:
push:
branches:
- master
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Install buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Build and Push
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "GITHUB_REF: ${GITHUB_REF}"
[ -n "${GITHUB_REF}" ] && [ "${GITHUB_REF}" != "refs/heads/master" ] && TAG="${GITHUB_REF}" || TAG="latest"
TAG=$(echo "$TAG" | sed -e 's,.*/\(.*\),\1,')
echo "TAG: ${TAG}"
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file ./Dockerfile . \
--tag $(echo "${DOCKER_USERNAME}" | tr '[:upper:]' '[:lower:]')/vuegraf:${TAG}