mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-18 02:35:51 +00:00
ci: Fix nightly (#1514)
This commit is contained in:
15
.github/workflows/build_clio_docker_image.yml
vendored
15
.github/workflows/build_clio_docker_image.yml
vendored
@@ -13,6 +13,10 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Whether to strip clio binary
|
description: Whether to strip clio binary
|
||||||
default: true
|
default: true
|
||||||
|
publish_image:
|
||||||
|
type: boolean
|
||||||
|
description: Whether to publish docker image
|
||||||
|
required: true
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -59,10 +63,15 @@ jobs:
|
|||||||
- name: Unpack binary
|
- name: Unpack binary
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
sudo apt update && sudo apt install -y tar unzip
|
||||||
cd docker/clio/artifact
|
cd docker/clio/artifact
|
||||||
artifact=$(find . -type file)
|
artifact=$(find . -type f)
|
||||||
|
if [[ $artifact == *.zip ]]; then
|
||||||
|
unzip $artifact
|
||||||
|
elif [[ $artifact == *.tar.gz ]]; then
|
||||||
tar -xvf $artifact
|
tar -xvf $artifact
|
||||||
mv clio_server ../clio_server
|
fi
|
||||||
|
mv clio_server ../
|
||||||
cd ../
|
cd ../
|
||||||
rm -rf ./artifact
|
rm -rf ./artifact
|
||||||
|
|
||||||
@@ -79,7 +88,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
image_name: rippleci/clio
|
image_name: rippleci/clio
|
||||||
push_image: true
|
push_image: ${{ inputs.publish_image }}
|
||||||
directory: docker/clio
|
directory: docker/clio
|
||||||
tags: ${{ inputs.tags }}
|
tags: ${{ inputs.tags }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|||||||
10
.github/workflows/nightly.yml
vendored
10
.github/workflows/nightly.yml
vendored
@@ -3,6 +3,10 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 5 * * 1-5'
|
- cron: '0 5 * * 1-5'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/nightly.yml'
|
||||||
|
- '.github/workflows/build_clio_docker_image.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -130,6 +134,7 @@ jobs:
|
|||||||
./clio_integration_tests --backend_host=scylladb
|
./clio_integration_tests --backend_host=scylladb
|
||||||
|
|
||||||
nightly_release:
|
nightly_release:
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
needs: run_tests
|
needs: run_tests
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
@@ -174,17 +179,18 @@ jobs:
|
|||||||
|
|
||||||
build_and_publish_docker_image:
|
build_and_publish_docker_image:
|
||||||
uses: ./.github/workflows/build_clio_docker_image.yml
|
uses: ./.github/workflows/build_clio_docker_image.yml
|
||||||
|
needs: run_tests
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=nightly
|
type=raw,value=nightly
|
||||||
type=ref,value=${{ env.GITHUB_SHA }}
|
|
||||||
artifact_name: clio_server_Linux_Release
|
artifact_name: clio_server_Linux_Release
|
||||||
strip_binary: true
|
strip_binary: true
|
||||||
|
publish_image: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|
||||||
create_issue_on_failure:
|
create_issue_on_failure:
|
||||||
needs: [build, run_tests, nightly_release]
|
needs: [build, run_tests, nightly_release]
|
||||||
if: ${{ always() && contains(needs.*.result, 'failure') }}
|
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name != 'pull_request' }}
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
Reference in New Issue
Block a user