Skip to content

Commit 2198ece

Browse files
authored
Migrate from Docker Hub to GHCR (#143)
1 parent e71c4d0 commit 2198ece

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ jobs:
1616
run: |
1717
docker build \
1818
--no-cache \
19-
-t spaceapi/website:latest \
20-
-t spaceapi/website:v3 \
21-
-t spaceapi/website:master \
19+
-t ghcr.io/spaceapi/website:latest \
20+
-t ghcr.io/spaceapi/website:v3 \
21+
-t ghcr.io/spaceapi/website:master \
22+
--label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
2223
.
24+
- name: Login to GitHub Container Registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
2330
- name: Push Docker image
2431
run: |
25-
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" && \
26-
docker push -a spaceapi/website
32+
docker push -a ghcr.io/spaceapi/website

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ Schema documentation is generated from the schema. To update:
8888
<!-- Badges -->
8989
[ci]: https://github.com/SpaceAPI/website/actions?query=workflow%3ACI
9090
[ci-badge]: https://img.shields.io/github/actions/workflow/status/SpaceAPI/website/ci.yml?branch=master
91-
[docker-image]: https://hub.docker.com/r/spaceapi/website/
92-
[docker-image-badge]: https://img.shields.io/docker/pulls/spaceapi/website.svg
91+
[docker-image]: https://github.com/SpaceApi/website/pkgs/container/website
92+
[docker-image-badge]: https://img.shields.io/badge/container%20image-ghcr.io/spaceapi/website-blue.svg

0 commit comments

Comments
 (0)