Skip to content

Commit 7c3f0e1

Browse files
feat: add push step to workflow
1 parent 905a946 commit 7c3f0e1

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
1110
build:
12-
1311
runs-on: ubuntu-latest
14-
1512
steps:
16-
- uses: actions/checkout@v4
17-
- name: Build the Docker image
18-
run: docker build . --file Dockerfile --tag cosmify/docs:$(date +%s)
13+
- name: 'Checkout GitHub Action'
14+
uses: actions/checkout@main
15+
- name: 'Login to GitHub Container Registry'
16+
uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{github.actor}}
20+
password: ${{secrets.GITHUB_TOKEN}}
21+
- name: 'Build & Push Image'
22+
run: |
23+
docker build . --tag ghcr.io/cosmify-dev/docs:latest
24+
docker push ghcr.io/cosmify-dev/docs:latest

0 commit comments

Comments
 (0)