-
Notifications
You must be signed in to change notification settings - Fork 84
36 lines (29 loc) · 978 Bytes
/
cd.yaml
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
name: CD
on:
push:
branches:
- 'main'
# Grant permissions to obtain federated identity credentials
# see https://docs.github.com/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure
permissions:
id-token: write
contents: read
jobs:
# Build runtime image in Azure Container Registry, tagged with the commit ID.
Build:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v4
# Build Docker runtime image
- name: 'Build image'
run: docker build -t data-dashboard .
# Run Docker container
- name: 'Run container'
run: docker run -p 8080:80 -d --rm --name data-dashboard data-dashboard
# Verify docker image
- name: 'Verify container'
run: |
curl -O https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
chmod +x wait-for-it.sh
./wait-for-it.sh -t 20 localhost:8080