mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-28 10:13:10 +00:00
ci: add compatible contracts image for nim-codex docker image
This commit is contained in:
parent
4e2a321ad5
commit
ce606a5a27
11
.github/workflows/docker-reusable.yml
vendored
11
.github/workflows/docker-reusable.yml
vendored
@ -59,6 +59,10 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: false
|
||||
contract_image:
|
||||
description: Specifies compatible smart contract image
|
||||
required: false
|
||||
type: string
|
||||
|
||||
|
||||
env:
|
||||
@ -71,6 +75,7 @@ env:
|
||||
TAG_LATEST: ${{ inputs.tag_latest }}
|
||||
TAG_SHA: ${{ inputs.tag_sha }}
|
||||
TAG_SUFFIX: ${{ inputs.tag_suffix }}
|
||||
CONTRACT_IMAGE: ${{ inputs.contract_image }}
|
||||
# Tests
|
||||
TESTS_SOURCE: codex-storage/cs-codex-dist-tests
|
||||
TESTS_BRANCH: master
|
||||
@ -183,6 +188,11 @@ jobs:
|
||||
else
|
||||
echo "TAG_RAW=false" >>$GITHUB_ENV
|
||||
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
|
||||
uses: actions/download-artifact@v4
|
||||
@ -199,6 +209,7 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.DOCKER_REPO }}
|
||||
labels: ${{ env.CONTRACT_LABEL }}
|
||||
flavor: |
|
||||
latest=${{ env.TAG_LATEST }}
|
||||
suffix=${{ env.TAG_SUFFIX }},onlatest=true
|
||||
|
||||
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@ -20,9 +20,21 @@ on:
|
||||
|
||||
|
||||
jobs:
|
||||
build-contracts-and-push:
|
||||
name: Build and Push Codex Contracts
|
||||
uses: codex-storage/github-actions/.github/workflows/docker-reusable.yml@master
|
||||
with:
|
||||
docker_build_context: vendor/codex-contracts-eth
|
||||
docker_file: vendor/codex-contracts-eth/docker/Dockerfile
|
||||
dockerhub_repo: codexstorage/codex-contracts-eth
|
||||
tag_suffix: -codex-factory
|
||||
tag_sha_long: true
|
||||
secrets: inherit
|
||||
|
||||
build-and-push:
|
||||
name: Build and Push
|
||||
uses: ./.github/workflows/docker-reusable.yml
|
||||
with:
|
||||
tag_latest: ${{ github.ref_name == github.event.repository.default_branch || startsWith(github.ref, 'refs/tags/') }}
|
||||
contract_image: "codexstorage/codex-contracts-eth:${{ github.sha }}-codex-factory"
|
||||
secrets: inherit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user