Skip to content

Commit edf959e

Browse files
committed
Switch from Docker Hub to ghcr.io
1 parent 0009fca commit edf959e

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ jobs:
7575
with:
7676
token: ${{ secrets.GITHUB_TOKEN }}
7777

78+
docker-build:
79+
name: Build Docker Image
80+
runs-on: ubuntu-latest
81+
needs: [test, clippy, fmt]
82+
if: github.ref != 'refs/heads/main'
83+
steps:
84+
- name: Checkout code
85+
uses: actions/checkout@v4
86+
87+
- name: Set up Docker Buildx
88+
uses: docker/setup-buildx-action@v3
89+
90+
- name: Build
91+
uses: docker/build-push-action@v5
92+
with:
93+
context: .
94+
push: false
95+
no-cache: true
96+
7897
docker-publish:
7998
name: Build and Publish Docker Image
8099
runs-on: ubuntu-latest
@@ -94,11 +113,12 @@ jobs:
94113
- name: Set up Docker Buildx
95114
uses: docker/setup-buildx-action@v3
96115

97-
- name: Login to Docker Hub
116+
- name: Login to GitHub Container Registry
98117
uses: docker/login-action@v3
99118
with:
100-
username: ${{ secrets.DOCKER_USERNAME }}
101-
password: ${{ secrets.DOCKER_TOKEN }}
119+
registry: ghcr.io
120+
username: ${{ github.actor }}
121+
password: ${{ secrets.GITHUB_TOKEN }}
102122

103123
- name: Build and push
104124
uses: docker/build-push-action@v5
@@ -107,5 +127,5 @@ jobs:
107127
push: true
108128
no-cache: true
109129
tags: |
110-
dbrgn/xc-bot:${{ steps.version.outputs.branch }}
111-
dbrgn/xc-bot:${{ steps.version.outputs.version }}
130+
ghcr.io/dbrgn/xc-bot:${{ steps.version.outputs.branch }}
131+
ghcr.io/dbrgn/xc-bot:${{ steps.version.outputs.version }}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ processed flights and flight subscriptions.
4242

4343
## Docker Image
4444

45-
The repository includes a Dockerfile.
45+
The repository includes a Dockerfile, which is published automatically at
46+
`ghcr.io/dbrgn/xc-bot`.
4647

4748
Important paths:
4849

0 commit comments

Comments
 (0)