Skip to content

Commit c10906d

Browse files
authored
Create publish-main.yml
1 parent 8802d4c commit c10906d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/publish-main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish main to GHCR.io
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Login to GHCR.io
19+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
20+
21+
- name: Build and push images
22+
run: |
23+
IMAGE_NAME=ghcr.io/penguinmod/penguinmod-storageextapi
24+
docker buildx build --push -t $IMAGE_NAME:${{ github.sha }} -t $IMAGE_NAME:latest .

0 commit comments

Comments
 (0)