From 41ea1888c26ef6f53f86ad1286715e4fd02730b9 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sat, 25 Mar 2023 20:32:02 +0000 Subject: ci: Migrate to GitHub Container Registry (#143) Docker Inc is sunsetting free team organizations for the Docker registry, which our organization is one of. Instead, a paid subscription is now required to maintain the organization. Given our relatively small usage of the account, it makes more sense to start publishing the container images on the GitHub Container Registry, since it is free for open source projects and integrates well with GitHub Actions. Fixes #141 --- .github/workflows/build.yml | 1 + .github/workflows/publish.yml | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 158c4292..ca83aefc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: [ master ] push: branches: [ master ] + merge_group: jobs: build: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5ed617de..7480a9a9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: - name: Prepare id: prep run: | - DOCKER_IMAGE=atlargeresearch/opendc + DOCKER_IMAGE=ghcr.io/atlarge-research/opendc VERSION=3.0-SNAPSHOT if [[ $GITHUB_REF == refs/tags/v* ]]; then VERSION=${GITHUB_REF#refs/tags/v} @@ -22,8 +22,9 @@ jobs: - name: Login to DockerHub 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: Push to Docker Hub uses: docker/build-push-action@v4 with: @@ -37,7 +38,7 @@ jobs: - name: Prepare id: prep run: | - DOCKER_IMAGE=atlargeresearch/opendc-web-api + DOCKER_IMAGE=ghcr.io/atlarge-research/opendc-web-api VERSION=3.0-SNAPSHOT if [[ $GITHUB_REF == refs/tags/v* ]]; then VERSION=${GITHUB_REF#refs/tags/v} @@ -46,8 +47,9 @@ jobs: - name: Login to DockerHub 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: Push to Docker Hub uses: docker/build-push-action@v4 with: @@ -63,7 +65,7 @@ jobs: - name: Prepare id: prep run: | - DOCKER_IMAGE=atlargeresearch/opendc-web-ui + DOCKER_IMAGE=ghcr.io/atlarge-research/opendc-web-ui VERSION=3.0-SNAPSHOT if [[ $GITHUB_REF == refs/tags/v* ]]; then VERSION=${GITHUB_REF#refs/tags/v} @@ -72,8 +74,9 @@ jobs: - name: Login to DockerHub 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: Push to Docker Hub uses: docker/build-push-action@v4 with: -- cgit v1.2.3