mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-05-17 00:39:48 +00:00
ci: build images for dist-tests (#1384)
This commit is contained in:
parent
ec5826ecb0
commit
f8d3e0d3be
39
.github/workflows/docker-dist-tests.yml
vendored
Normal file
39
.github/workflows/docker-dist-tests.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Docker - Dist-Tests
|
||||||
|
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.gitignore'
|
||||||
|
- '.github/**'
|
||||||
|
- '!.github/workflows/docker-dist-tests.yml'
|
||||||
|
- '!.github/workflows/docker-reusable.yml'
|
||||||
|
- 'docker/**'
|
||||||
|
- '!docker/codex.Dockerfile'
|
||||||
|
- '!docker/docker-entrypoint.sh'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
run_release_tests:
|
||||||
|
description: Run Release tests
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
name: Build and Push
|
||||||
|
uses: ./.github/workflows/docker-reusable.yml
|
||||||
|
with:
|
||||||
|
nimflags: '-d:disableMarchNative -d:codex_enable_api_debug_peers=true -d:codex_enable_proof_failures=true -d:codex_enable_log_counter=true -d:verify_circuit=true'
|
||||||
|
nat_ip_auto: true
|
||||||
|
tag_latest: ${{ github.ref_name == github.event.repository.default_branch || startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
tag_suffix: dist-tests
|
||||||
|
tag_stable: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run_release_tests: ${{ inputs.run_release_tests }}
|
||||||
|
secrets: inherit
|
||||||
19
.github/workflows/docker-reusable.yml
vendored
19
.github/workflows/docker-reusable.yml
vendored
@ -64,10 +64,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: false
|
default: false
|
||||||
contract_image:
|
|
||||||
description: Specifies compatible smart contract image
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
outputs:
|
outputs:
|
||||||
codex_image:
|
codex_image:
|
||||||
description: Logos Storage Docker image tag
|
description: Logos Storage Docker image tag
|
||||||
@ -85,7 +81,6 @@ env:
|
|||||||
TAG_STABLE: ${{ inputs.tag_stable }}
|
TAG_STABLE: ${{ inputs.tag_stable }}
|
||||||
TAG_SHA: ${{ inputs.tag_sha }}
|
TAG_SHA: ${{ inputs.tag_sha }}
|
||||||
TAG_SUFFIX: ${{ inputs.tag_suffix }}
|
TAG_SUFFIX: ${{ inputs.tag_suffix }}
|
||||||
CONTRACT_IMAGE: ${{ inputs.contract_image }}
|
|
||||||
# Tests
|
# Tests
|
||||||
TESTS_SOURCE: logos-storage/logos-storage-nim-cs-dist-tests
|
TESTS_SOURCE: logos-storage/logos-storage-nim-cs-dist-tests
|
||||||
TESTS_BRANCH: master
|
TESTS_BRANCH: master
|
||||||
@ -135,19 +130,11 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Docker - Variables
|
|
||||||
run: |
|
|
||||||
# Create contract label for compatible contract image if specified
|
|
||||||
if [[ -n "${{ env.CONTRACT_IMAGE }}" ]]; then
|
|
||||||
echo "CONTRACT_LABEL=storage.codex.nim-codex.blockchain-image=${{ env.CONTRACT_IMAGE }}" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Docker - Meta
|
- name: Docker - Meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DOCKER_REPO }}
|
images: ${{ env.DOCKER_REPO }}
|
||||||
labels: ${{ env.CONTRACT_LABEL }}
|
|
||||||
|
|
||||||
- name: Docker - Set up Buildx
|
- name: Docker - Set up Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -220,11 +207,6 @@ jobs:
|
|||||||
echo "TAG_RAW=false" >> $GITHUB_ENV
|
echo "TAG_RAW=false" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create contract label for compatible contract image if specified
|
|
||||||
if [[ -n "${{ env.CONTRACT_IMAGE }}" ]]; then
|
|
||||||
echo "CONTRACT_LABEL=storage.codex.nim-codex.blockchain-image=${{ env.CONTRACT_IMAGE }}" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Docker - Download digests
|
- name: Docker - Download digests
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@ -240,7 +222,6 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DOCKER_REPO }}
|
images: ${{ env.DOCKER_REPO }}
|
||||||
labels: ${{ env.CONTRACT_LABEL }}
|
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=${{ env.TAG_LATEST }}
|
latest=${{ env.TAG_LATEST }}
|
||||||
suffix=${{ env.TAG_SUFFIX }},onlatest=true
|
suffix=${{ env.TAG_SUFFIX }},onlatest=true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user