mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-16 01:35:52 +00:00
ci: Make CI work well in forks (#2434)
This commit is contained in:
32
.github/workflows/update_docker_ci.yml
vendored
32
.github/workflows/update_docker_ci.yml
vendored
@@ -81,7 +81,7 @@ jobs:
|
|||||||
build_args: |
|
build_args: |
|
||||||
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
|
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
|
||||||
GCC_VERSION=${{ env.GCC_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.
|
dockerhub_description: GCC compiler for XRPLF/clio.
|
||||||
|
|
||||||
gcc-arm64:
|
gcc-arm64:
|
||||||
@@ -119,7 +119,7 @@ jobs:
|
|||||||
build_args: |
|
build_args: |
|
||||||
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
|
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
|
||||||
GCC_VERSION=${{ env.GCC_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.
|
dockerhub_description: GCC compiler for XRPLF/clio.
|
||||||
|
|
||||||
gcc-merge:
|
gcc-merge:
|
||||||
@@ -148,7 +148,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- 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
|
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USER }}
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
@@ -157,15 +157,21 @@ jobs:
|
|||||||
- name: Create and push multi-arch manifest
|
- name: Create and push multi-arch manifest
|
||||||
if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
|
if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
for image in ${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc rippleci/clio_gcc; do
|
push_image() {
|
||||||
|
image=$1
|
||||||
|
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
-t $image:latest \
|
-t $image:latest \
|
||||||
-t $image:${{ env.GCC_MAJOR_VERSION }} \
|
-t $image:${{ env.GCC_MAJOR_VERSION }} \
|
||||||
-t $image:${{ env.GCC_VERSION }} \
|
-t $image:${{ env.GCC_VERSION }} \
|
||||||
-t $image:${{ github.sha }} \
|
-t $image:${{ github.sha }} \
|
||||||
$image:arm64-latest \
|
$image:arm64-latest \
|
||||||
$image:amd64-latest
|
$image:amd64-latest
|
||||||
done
|
}
|
||||||
|
push_image ${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc
|
||||||
|
if [[ ${{ github.repository_owner }} == 'XRPLF' ]]; then
|
||||||
|
push_image rippleci/clio_clang
|
||||||
|
fi
|
||||||
|
|
||||||
clang:
|
clang:
|
||||||
name: Build and push Clang docker image
|
name: Build and push Clang docker image
|
||||||
@@ -200,7 +206,7 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
build_args: |
|
build_args: |
|
||||||
CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }}
|
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.
|
dockerhub_description: Clang compiler for XRPLF/clio.
|
||||||
|
|
||||||
tools-amd64:
|
tools-amd64:
|
||||||
@@ -328,5 +334,5 @@ jobs:
|
|||||||
CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }}
|
CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }}
|
||||||
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
|
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
|
||||||
GCC_VERSION=${{ env.GCC_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.
|
dockerhub_description: CI image for XRPLF/clio.
|
||||||
|
|||||||
4
.github/workflows/upload_conan_deps.yml
vendored
4
.github/workflows/upload_conan_deps.yml
vendored
@@ -97,9 +97,9 @@ jobs:
|
|||||||
build_type: ${{ matrix.build_type }}
|
build_type: ${{ matrix.build_type }}
|
||||||
|
|
||||||
- name: Login to Conan
|
- 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 }}
|
run: conan remote login -p ${{ secrets.CONAN_PASSWORD }} ripple ${{ secrets.CONAN_USERNAME }}
|
||||||
|
|
||||||
- name: Upload Conan packages
|
- 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' || '' }}
|
run: conan upload "*" -r=ripple --confirm ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user