Skip to content

update: version, minor fixes #22

update: version, minor fixes

update: version, minor fixes #22

Workflow file for this run

name: Build multiarch image - latest
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
steps:
- name: Set latest tag
id: vars
run: echo ::set-output name=tag::latest
- name: Checkout
uses: actions/checkout@v2
# with:
# ref: ${{ steps.vars.outputs.tag }}
- name: Prepare
id: prep
run: |
BUILD_DATE=$(date --rfc-3339=seconds --utc)
echo ::set-output name=build_date::${BUILD_DATE}
PLATFORMS=amd64,arm,arm64
TAGS1="quay.io/${{ github.repository_owner }}/tor:${{ steps.vars.outputs.tag }}"
if [ "${{github.event_name}}" == "pull_request" ]; then
echo ::set-output name=push::false
else
echo ::set-output name=push::true
echo ::set-output name=tags1::${TAGS1}
echo ::set-output name=branch::${GIT_BRANCH}
fi
echo ::set-output name=platforms::${PLATFORMS}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ steps.prep.outputs.platforms }}
- name: Login to Quay.io
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
version: latest
driver-opts: image=moby/buildkit:latest
- name: Build and push (tor)
uses: docker/build-push-action@v2
with:
labels: |
org.opencontainers.image.created=${{ steps.prep.outputs.build_date }}
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: ${{ steps.prep.outputs.platforms }}
push: ${{ steps.prep.outputs.push }}
tags: ${{ steps.prep.outputs.tags1 }}