Skip to content

Commit 8f7924a

Browse files
authored
Migrate from Docker Hub to GHCR (#3)
1 parent 6a6dd9d commit 8f7924a

File tree

4 files changed

+53
-38
lines changed

4 files changed

+53
-38
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
push:
3+
4+
name: Build
5+
6+
jobs:
7+
8+
docker-build:
9+
name: Build Docker image
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Build Docker image
14+
run: |
15+
docker build -t ghcr.io/spaceapi-community/spaceapi-sensor-logger:latest .

.github/workflows/ci.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
schedule:
6+
- cron: '30 3 * * 2'
7+
8+
name: Publish
9+
10+
jobs:
11+
12+
docker-publish:
13+
name: Publish Docker image
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Build Docker image
18+
run: |
19+
docker build \
20+
--no-cache \
21+
-t ghcr.io/spaceapi-community/spaceapi-sensor-logger:latest \
22+
-t ghcr.io/spaceapi-community/spaceapi-sensor-logger:v1 \
23+
--label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
24+
.
25+
- name: Login to GitHub Container Registry
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Push Docker image
32+
run: |
33+
docker push -a ghcr.io/spaceapi-community/spaceapi-sensor-logger

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SpaceAPI InfluxDB Sensor Logger
22

3-
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/spaceapi/influxdb-sensor-logger/latest)](https://hub.docker.com/r/spaceapi/influxdb-sensor-logger)
3+
[![Docker Image][docker-image-badge]][docker-image]
44

55
A Python 3 script to relay sensor values from a SpaceAPI endpoint to an
66
InfluxDB instance so it can be viewed in Grafana.
@@ -41,7 +41,7 @@ Configure it using the following env vars:
4141
- `SPACEAPI_ENDPOINT`
4242
- `RELAY_INTERVAL_SECONDS`
4343

44-
The image is published at [docker.io/spaceapi/influxdb-sensor-logger](https://hub.docker.com/r/spaceapi/influxdb-sensor-logger).
44+
The image is published at [ghcr.io/spaceapi-community/spaceapi-sensor-logger](https://ghcr.io/spaceapi-community/spaceapi-sensor-logger).
4545

4646

4747
## License
@@ -60,3 +60,6 @@ Unless you explicitly state otherwise, any contribution intentionally
6060
submitted for inclusion in the work by you, as defined in the Apache-2.0
6161
license, shall be dual licensed as above, without any additional terms or
6262
conditions.
63+
64+
[docker-image]: https://ghcr.io/spaceapi-community/spaceapi-sensor-logger
65+
[docker-image-badge]: https://img.shields.io/badge/container%20image-ghcr.io/spaceapi-community/spaceapi-sensor-logger-blue.svg

0 commit comments

Comments
 (0)