From 7cf9196c14336e847280732821b69c057d9704bf Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Fri, 14 May 2021 19:12:34 +0100 Subject: [PATCH] refactor: move `ghcr` namespace to the `namespaces` job Lays the groundwork for splitting the `docker` job into `candidates` and `releases`. PR: #41 --- .github/workflows/containers.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index c64a0b7..2ea71d8 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest outputs: docker-hub: ${{ secrets.DOCKER_HUB_NAMESPACE || github.repository_owner }} + ghcr: ${{ github.repository_owner }} steps: - run: true credentials: @@ -137,15 +138,15 @@ jobs: docker pull docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.versions-tag }} docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.latest-tag }} - docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} - docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.versions-tag }} - docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.latest-tag }} + docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} ghcr.io/${{ needs.namespaces.outputs.ghcr }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} + docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} ghcr.io/${{ needs.namespaces.outputs.ghcr }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.versions-tag }} + docker tag docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} ghcr.io/${{ needs.namespaces.outputs.ghcr }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.latest-tag }} docker push docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} docker push docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.versions-tag }} docker push docker.io/${{ needs.namespaces.outputs.docker-hub }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.latest-tag }} - docker push ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} - docker push ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.versions-tag }} - docker push ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.latest-tag }} + docker push ghcr.io/${{ needs.namespaces.outputs.ghcr }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.candidate-tag }} + docker push ghcr.io/${{ needs.namespaces.outputs.ghcr }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.versions-tag }} + docker push ghcr.io/${{ needs.namespaces.outputs.ghcr }}/${{ steps.vars.outputs.repository-name }}:${{ steps.vars.outputs.latest-tag }} git-tag: needs: - docker