diff --git a/.github/actions/build_docker_image/action.yml b/.github/actions/build_docker_image/action.yml index 453251d9..9f347de5 100644 --- a/.github/actions/build_docker_image/action.yml +++ b/.github/actions/build_docker_image/action.yml @@ -1,8 +1,12 @@ name: Build and push Docker image description: Build and push Docker image to DockerHub and GitHub Container Registry + inputs: - image_name: - description: Name of the image to build + images: + description: Name of the images to use as a base name + required: true + dockerhub_repo: + description: DockerHub repository name required: true push_image: description: Whether to push the image to the registry (true/false) @@ -19,6 +23,7 @@ inputs: description: description: Short description of the image required: true + runs: using: composite steps: @@ -45,7 +50,7 @@ runs: - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 #v5.7.0 id: meta with: - images: ${{ inputs.image_name }} + images: ${{ inputs.images }} tags: ${{ inputs.tags }} - name: Build and push @@ -62,6 +67,6 @@ runs: with: username: ${{ env.DOCKERHUB_USER }} password: ${{ env.DOCKERHUB_PW }} - repository: ${{ inputs.image_name }} + repository: ${{ inputs.dockerhub_repo }} short-description: ${{ inputs.description }} readme-filepath: ${{ inputs.directory }}/README.md diff --git a/.github/workflows/build_clio_docker_image.yml b/.github/workflows/build_clio_docker_image.yml index 07c6ba32..ae3cbde7 100644 --- a/.github/workflows/build_clio_docker_image.yml +++ b/.github/workflows/build_clio_docker_image.yml @@ -87,7 +87,10 @@ jobs: DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - image_name: rippleci/clio + images: | + rippleci/clio + ghcr.io/xrplf/clio + dockerhub_repo: rippleci/clio push_image: ${{ inputs.publish_image }} directory: docker/clio tags: ${{ inputs.tags }} diff --git a/.github/workflows/update_docker_ci.yml b/.github/workflows/update_docker_ci.yml index fd22692c..9d31b42f 100644 --- a/.github/workflows/update_docker_ci.yml +++ b/.github/workflows/update_docker_ci.yml @@ -1,4 +1,5 @@ name: Update CI docker image + on: pull_request: paths: @@ -29,7 +30,10 @@ jobs: DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - image_name: rippleci/clio_ci + images: | + rippleci/clio_ci + ghcr.io/xrplf/clio-ci + dockerhub_repo: rippleci/clio_ci push_image: ${{ github.event_name != 'pull_request' }} directory: docker/ci tags: |