-
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 864 Bytes
/
deploy.yml
File metadata and controls
31 lines (29 loc) · 864 Bytes
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
name: Deploy
on:
workflow_run:
workflows: [CI]
types: [completed]
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push image
run: |
IMAGE_NAME=${{ secrets.REGISTRY }}/atlas-sanctum-api:latest
docker build -t "$IMAGE_NAME" .
docker push "$IMAGE_NAME"
- name: Deploy to cluster
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
kubectl apply -f k8s/