fix indent #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish docker image | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
publish-docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
- name: Login to Appclacks Container Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_LOGIN }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build/Push image appclacks/mirabelle:latest | |
shell: /usr/bin/bash {0} | |
run: | | |
docker build . -t appclacks/mirabelle:latest | |
docker push appclacks/mirabelle:latest | |
# get tags of current commit | |
tag=$(git describe --exact-match --tags $(git log -n1 --pretty='%h')) | |
if [ ! -z "$tag" ]; then | |
echo "Tag name from git describe: $tag" | |
docker tag appclacks/mirabelle:latest appclacks/mirabelle:$tag | |
docker push appclacks/mirabelle:$tag | |
fi |