-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (38 loc) · 1.26 KB
/
CD.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CD
on:
push:
branches: [ main ]
jobs:
deploy:
if: ${{ github.event.head_commit.committer.name != 'Versioning Action' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.KEY }}
- name: Bump version
uses: tool3/bump@master
id: bump
with:
github_token: ${{ secrets.KEY }}
user: 'Versioning Action'
email: '[email protected]'
branch: 'main'
- name: Build Docker images
run: docker build --tag michaeljolley/twitch-orbit:${{ steps.bump.outputs.version }} --tag michaeljolley/twitch-orbit:latest .
- name: Login to Docker Hub
if: success()
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
- name: Push :latest tag to Docker Hub
if: success()
uses: actions-hub/docker@master
with:
args: push michaeljolley/twitch-orbit:latest
- name: Push version tag to Docker Hub
if: success()
uses: actions-hub/docker@master
with:
args: push michaeljolley/twitch-orbit:${{ steps.bump.outputs.version }}