-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (33 loc) · 1.07 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
name: CD
on:
push:
tags: "v*"
# allow manually triggering this workflow
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
APP_ENVIRONMENT: github_workflow
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Latest Tag
id: latest-tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: latest
- name: Log into Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: true
tags: dhruvahuja/backend_burger:${{ steps.latest-tag.outputs.tag }}
labels: ${{steps.latest-tag.outputs.tag}}