-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 806 Bytes
/
deploy.yaml
File metadata and controls
38 lines (29 loc) · 806 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
32
33
34
35
36
37
38
name: Deploy
on:
pull_request:
types:
- "closed"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code...
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PAT }}
- name: Build Docker Image
run: docker build . --file Dockerfile --tag ghcr.io/${{ env.IMAGE_NAME }}:latest
- name: Push images to Github Registry
run: |
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest