mirror of https://github.com/fmartingr/bazaar.git
35 lines
850 B
YAML
35 lines
850 B
YAML
|
name: "Build Docker"
|
||
|
|
||
|
on:
|
||
|
workflow_call:
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
buildx:
|
||
|
runs-on: ubuntu-latest
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
name: Build Docker
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- uses: actions/download-artifact@v3
|
||
|
with:
|
||
|
name: dist
|
||
|
path: dist
|
||
|
|
||
|
- name: Buildx
|
||
|
run: |
|
||
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u "${{ github.repository_owner }}" --password-stdin ghcr.io
|
||
|
REPOSITORY=ghcr.io/${{ github.repository }}
|
||
|
|
||
|
TAG=latest
|
||
|
if [ -z "$(git tag --points-at HEAD)" ]
|
||
|
then
|
||
|
TAG="dev"
|
||
|
fi
|
||
|
|
||
|
CONTAINER_BUILDX_OPTIONS="--push --output=type=registry --tag $REPOSITORY:$(git describe --tags) --tag $REPOSITORY:$TAG" make buildx
|