Skip to content

Commit

Permalink
ci: Fix nightly (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuznetsss authored Jul 3, 2024
1 parent 4dd3254 commit aa86075
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build_clio_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
type: boolean
description: Whether to strip clio binary
default: true
publish_image:
type: boolean
description: Whether to publish docker image
required: true

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -59,10 +63,15 @@ jobs:
- name: Unpack binary
shell: bash
run: |
sudo apt update && sudo apt install -y tar unzip
cd docker/clio/artifact
artifact=$(find . -type file)
tar -xvf $artifact
mv clio_server ../clio_server
artifact=$(find . -type f)
if [[ $artifact == *.zip ]]; then
unzip $artifact
elif [[ $artifact == *.tar.gz ]]; then
tar -xvf $artifact
fi
mv clio_server ../
cd ../
rm -rf ./artifact
Expand All @@ -79,7 +88,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image_name: rippleci/clio
push_image: true
push_image: ${{ inputs.publish_image }}
directory: docker/clio
tags: ${{ inputs.tags }}
platforms: linux/amd64
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
schedule:
- cron: '0 5 * * 1-5'
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/nightly.yml'
- '.github/workflows/build_clio_docker_image.yml'

jobs:
build:
Expand Down Expand Up @@ -130,6 +134,7 @@ jobs:
./clio_integration_tests --backend_host=scylladb
nightly_release:
if: ${{ github.event_name != 'pull_request' }}
needs: run_tests
runs-on: ubuntu-20.04
env:
Expand Down Expand Up @@ -174,17 +179,18 @@ jobs:
build_and_publish_docker_image:
uses: ./.github/workflows/build_clio_docker_image.yml
needs: run_tests
secrets: inherit
with:
tags: |
type=raw,value=nightly
type=ref,value=${{ env.GITHUB_SHA }}
artifact_name: clio_server_Linux_Release
strip_binary: true
publish_image: ${{ github.event_name != 'pull_request' }}

create_issue_on_failure:
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
permissions:
contents: write
Expand Down

0 comments on commit aa86075

Please sign in to comment.