Skip to content

Merge pull request #11 from daniel-shuy/feature/document-array-argument #34

Merge pull request #11 from daniel-shuy/feature/document-array-argument

Merge pull request #11 from daniel-shuy/feature/document-array-argument #34

Workflow file for this run

name: docker
on:
push:
branches:
- master
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Compute Tags
id: compute_tags
run: |
branch="${GITHUB_REF#refs/heads/}"
tag="${GITHUB_REF#refs/tags/v}"
if [ "$branch" != "$GITHUB_REF" ]; then
branch="$(echo "$branch" | sed -e 's/[^a-zA-Z0-9\-\.]/-/g')"
echo "::set-output name=TAGS::boxboat/config-merge:commit-${branch}"
elif [ "$tag" != "$GITHUB_REF" ]; then
latest=""
if ! echo "$tag" | grep -qF '-'; then
latest=",boxboat/config-merge:latest"
fi
tag="$(echo "$tag" | sed -e 's/[^a-zA-Z0-9\-\.]/-/g')"
echo "::set-output name=TAGS::boxboat/config-merge:${tag}${latest}"
else
echo "unable to determine tag" >&2
exit 1
fi
- name: Setup 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_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: "${{ steps.compute_tags.outputs.TAGS }}"