Skip to content

Commit

Permalink
Merge pull request #73 from metricq/chore-migrate-to-ghcr
Browse files Browse the repository at this point in the history
chore: migrate docker workflow to ghcr.io

hub.docker.com announced their plans to drop the free organizations. While backtracking on those changes,
we still decided to move to ghcr.io, as we are using Github anyways.
  • Loading branch information
bmario authored Apr 5, 2023
2 parents 553ded1 + 73d7291 commit df242d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=metricq/metricq-sink-nsca
DOCKER_IMAGE=ghcr.io/metricq/metricq-sink-nsca
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
Expand All @@ -48,12 +48,13 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
- name: Login to Github Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM metricq/metricq-python:v4.2 AS builder
FROM ghcr.io/metricq/metricq-python:v4.2 AS builder
LABEL maintainer="[email protected]"

USER root
Expand All @@ -13,7 +13,7 @@ COPY --chown=metricq:metricq . /home/metricq/sink-nsca
WORKDIR /home/metricq/sink-nsca
RUN pip install --user .

FROM metricq/metricq-python:v4.2
FROM ghcr.io/metricq/metricq-python:v4.2

USER root
RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/backports.list \
Expand Down

0 comments on commit df242d5

Please sign in to comment.