Merge pull request #319 from baznikin/custom-region #117
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: Docker | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build image & push | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
docker build -t ghcr.io/bitprocessor/atlassian-cloud-backup:$VERSION . | |
docker push ghcr.io/bitprocessor/atlassian-cloud-backup:$VERSION | |
if [ "$VERSION" != "latest" ] ; then | |
docker tag ghcr.io/bitprocessor/atlassian-cloud-backup:$VERSION ghcr.io/bitprocessor/atlassian-cloud-backup:latest | |
docker push ghcr.io/bitprocessor/atlassian-cloud-backup:latest | |
fi |