Skip to content

Commit 2b4c25e

Browse files
committed
Docker Publish Job
1 parent f896c67 commit 2b4c25e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,33 @@ jobs:
9797
context: .
9898
push: false
9999
tags: portfolio-site:test
100+
101+
docker-publish:
102+
name: Publish Docker Image
103+
runs-on: ubuntu-latest
104+
needs: [stylelint, prettier, eslint, docker-build]
105+
106+
permissions:
107+
contents: read
108+
packages: write
109+
110+
steps:
111+
- name: Checkout code
112+
uses: actions/checkout@v4
113+
114+
- name: Set up Docker Buildx
115+
uses: docker/setup-buildx-action@v3
116+
117+
- name: Login to GHCR
118+
uses: docker/login-action@v3
119+
with:
120+
registry: ghcr.io
121+
username: ${{ github.actor }}
122+
password: ${{ secrets.GITHUB_TOKEN }}
123+
124+
- name: Build and push image
125+
uses: docker/build-push-action@v5
126+
with:
127+
context: .
128+
push: true
129+
tags: ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)