-
-
Notifications
You must be signed in to change notification settings - Fork 27
32 lines (25 loc) · 937 Bytes
/
deploy-image.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
name: Deploy to GitHub Container Registry
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker build --file Dockerfile --tag ${{ github.repository }}:latest .
docker tag ${{ github.repository }}:latest docker.pkg.github.com/${{ github.repository }}/spellbook:latest
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: docker.pkg.github.com
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker image to GitHub Container Registry
run: docker push docker.pkg.github.com/${{ github.repository }}/spellbook:latest