Skip to content

Commit

Permalink
Stop pushing images to DockerHub (#26)
Browse files Browse the repository at this point in the history
We've transitioned to GitHub Container Registry.
  • Loading branch information
SeanTAllen authored Dec 5, 2023
1 parent 02d3fcd commit 3e2e63f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
16 changes: 2 additions & 14 deletions .ci-scripts/release/build-docker-images-on-release.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# *** You should already be logged in to DockerHub when you run this ***
# *** You should already be logged in to GitHub Container Registry when you run
# this ***
#
# Builds docker release images with two tags:
#
Expand Down Expand Up @@ -52,19 +53,6 @@ set -o nounset
# Version: "1.0.0"
VERSION="${GITHUB_REF/refs\/tags\//}"

## DockerHub

NAME="${GITHUB_REPOSITORY}"
# Build and push :VERSION tag e.g. ponylang/ponyup:0.32.1
DOCKER_TAG="${NAME}:${VERSION}"
docker build --pull -t "${DOCKER_TAG}" .
docker push "${DOCKER_TAG}"

# Build and push "release" tag e.g. ponylang/ponyup:release
DOCKER_TAG="${NAME}:release"
docker build --pull -t "${DOCKER_TAG}" .
docker push "${DOCKER_TAG}"

## GitHub Container Registry

NAME="ghcr.io/${GITHUB_REPOSITORY}"
Expand Down
10 changes: 2 additions & 8 deletions .ci-scripts/release/build-latest-docker-images.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# *** You should already be logged in to DockerHub when you run this ***
# *** You should already be logged in to GitHub Container Registry when you run
# this ***
#
# Builds docker latest docker images.
#
Expand Down Expand Up @@ -33,13 +34,6 @@ fi
# allow above so we can display nice error messages for expected unset variables
set -o nounset

## DockerHub

# Build and push "latest" tag e.g. ponylang/ponyup:latest
DOCKER_TAG="${GITHUB_REPOSITORY}:latest"
docker build --pull -t "${DOCKER_TAG}" .
docker push "${DOCKER_TAG}"

## GitHub Container Registry

# Build and push "latest" tag e.g. ponylang/ponyup:latest
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/latest-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- name: Login to GitHub Container Registry
# v2.2.0
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- name: Login to GitHub Container Registry
# v2.2.0
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
Expand Down

0 comments on commit 3e2e63f

Please sign in to comment.