generated from michaeljolley/repo-template-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (33 loc) · 1.11 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
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 }}
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
- uses: tool3/bump@master
id: bump
with:
github_token: ${{ secrets.KEY }}
user: 'Versioning Action'
email: '[email protected]'
branch: 'main'
- uses: azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_LOGIN }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: 'Push images to ACR'
run: |
echo "${{ steps.bump.outputs.version }}"
docker build . --tag ${{ secrets.ACR_LOGIN }}/guybot:${{ steps.bump.outputs.version }} --tag ${{ secrets.ACR_LOGIN }}/guybot:latest
docker push ${{ secrets.ACR_LOGIN }}/guybot:${{ steps.bump.outputs.version }}
docker push ${{ secrets.ACR_LOGIN }}/guybot:latest