forked from datreeio/jira-backup-py
-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (24 loc) · 907 Bytes
/
docker-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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