diff --git a/.github/workflows/update_docker_ci.yml b/.github/workflows/update_docker_ci.yml index bcb80bb8..a649acb1 100644 --- a/.github/workflows/update_docker_ci.yml +++ b/.github/workflows/update_docker_ci.yml @@ -81,7 +81,7 @@ jobs: build_args: | GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }} GCC_VERSION=${{ env.GCC_VERSION }} - dockerhub_repo: rippleci/clio_gcc + dockerhub_repo: ${{ github.repo_owner == 'XRPLF' && 'rippleci/clio_gcc' || '' }} dockerhub_description: GCC compiler for XRPLF/clio. gcc-arm64: @@ -119,7 +119,7 @@ jobs: build_args: | GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }} GCC_VERSION=${{ env.GCC_VERSION }} - dockerhub_repo: rippleci/clio_gcc + dockerhub_repo: ${{ github.repo_owner == 'XRPLF' && 'rippleci/clio_gcc' || '' }} dockerhub_description: GCC compiler for XRPLF/clio. gcc-merge: @@ -148,7 +148,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0 with: username: ${{ secrets.DOCKERHUB_USER }} @@ -157,15 +157,21 @@ jobs: - name: Create and push multi-arch manifest if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true' run: | - for image in ${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc rippleci/clio_gcc; do + push_image() { + image=$1 + docker buildx imagetools create \ - -t $image:latest \ - -t $image:${{ env.GCC_MAJOR_VERSION }} \ - -t $image:${{ env.GCC_VERSION }} \ - -t $image:${{ github.sha }} \ - $image:arm64-latest \ - $image:amd64-latest - done + -t $image:latest \ + -t $image:${{ env.GCC_MAJOR_VERSION }} \ + -t $image:${{ env.GCC_VERSION }} \ + -t $image:${{ github.sha }} \ + $image:arm64-latest \ + $image:amd64-latest + } + push_image ${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc + if [[ ${{ github.repository_owner }} == 'XRPLF' ]]; then + push_image rippleci/clio_clang + fi clang: name: Build and push Clang docker image @@ -200,7 +206,7 @@ jobs: platforms: linux/amd64,linux/arm64 build_args: | CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }} - dockerhub_repo: rippleci/clio_clang + dockerhub_repo: ${{ github.repo_owner == 'XRPLF' && 'rippleci/clio_clang' || '' }} dockerhub_description: Clang compiler for XRPLF/clio. tools-amd64: @@ -328,5 +334,5 @@ jobs: CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }} GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }} GCC_VERSION=${{ env.GCC_VERSION }} - dockerhub_repo: rippleci/clio_ci + dockerhub_repo: ${{ github.repo_owner == 'XRPLF' && 'rippleci/clio_ci' || '' }} dockerhub_description: CI image for XRPLF/clio. diff --git a/.github/workflows/upload_conan_deps.yml b/.github/workflows/upload_conan_deps.yml index f2a36aa1..88d7aeec 100644 --- a/.github/workflows/upload_conan_deps.yml +++ b/.github/workflows/upload_conan_deps.yml @@ -97,9 +97,9 @@ jobs: build_type: ${{ matrix.build_type }} - name: Login to Conan - if: github.event_name != 'pull_request' + if: github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' run: conan remote login -p ${{ secrets.CONAN_PASSWORD }} ripple ${{ secrets.CONAN_USERNAME }} - name: Upload Conan packages - if: github.event_name != 'pull_request' && github.event_name != 'schedule' + if: github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' && github.event_name != 'schedule' run: conan upload "*" -r=ripple --confirm ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }}