Skip to content

Commit 5dfbc8a

Browse files
authored
Migrate from Docker Hub to GHCR (#124)
1 parent 812d419 commit 5dfbc8a

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/update-docker-image.yml

+15-6
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Publish to Registry
15-
uses: elgohr/Publish-Docker-Github-Action@v5
14+
- name: Login to GitHub Container Registry
15+
uses: docker/login-action@v3
1616
with:
17-
name: spaceapi/schema
18-
username: ${{ secrets.DOCKER_USERNAME }}
19-
password: ${{ secrets.DOCKER_PASSWORD }}
20-
tags: "latest"
17+
registry: ghcr.io
18+
username: ${{ github.actor }}
19+
password: ${{ secrets.GITHUB_TOKEN }}
20+
- name: Build schema image
21+
run: |
22+
docker build \
23+
--no-cache \
24+
--tag ghcr.io/spaceapi/schema \
25+
--label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
26+
.
27+
- name: Publish schema image
28+
run: |
29+
docker push ghcr.io/spaceapi/schema:latest

0 commit comments

Comments
 (0)