Skip to content

update

update #1

Workflow file for this run

name: Docker Build
on:
pull_request:
push:
branches:
- master
- stable
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- tag: 'phabricator'
file: './Dockerfile'
- tag: 'daemon'
file: './Dockerfile.daemon'
- tag: 'aphlict'
file: './Dockerfile.aphlict'
- tag: 'sshd'
file: './Dockerfile.sshd'
steps:
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/stable' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: get image tag
id: get-tag
shell: bash
run: |
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then
tag="ghcr.io/phabricator-docker/${{ matrix.tag }}"
elif [[ ${{ github.ref }} == 'refs/heads/stable' ]]; then
tag="ghcr.io/phabricator-docker/${{ matrix.tag }}:stable"
else
tag=""
fi
echo "::set-output name=tag::$tag"
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/stable' }}
platforms: linux/amd64,linux/arm64
file: ${{ matrix.file }}
tags: ${{ steps.get-tag.outputs.tag }}