mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 13:33:10 +00:00
* ci: add compatible contracts image for nim-codex docker image * ci: with submodules * ci: with submodules on correct place * ci: remove double dash * ci: avoiding artifact conflicts * ci: add labels to arch images * ci: correct way to add label to arch images * ci: correct contract label * ci: avoid building contracts image and use contracts commit hash * refactor: better way to get the hash
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Docker
|
|
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- 'v*.*.*'
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.gitignore'
|
|
- '.github/**'
|
|
- '!.github/workflows/docker.yml'
|
|
- '!.github/workflows/docker-reusable.yml'
|
|
- 'docker/**'
|
|
- '!docker/codex.Dockerfile'
|
|
- '!docker/docker-entrypoint.sh'
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
get-contracts-hash:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
hash: ${{ steps.get-hash.outputs.hash }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Get submodule short hash
|
|
id: get-hash
|
|
run: |
|
|
hash=$(git rev-parse --short HEAD:vendor/codex-contracts-eth)
|
|
echo "hash=$hash" >> $GITHUB_OUTPUT
|
|
build-and-push:
|
|
name: Build and Push
|
|
uses: ./.github/workflows/docker-reusable.yml
|
|
needs: get-contracts-hash
|
|
with:
|
|
tag_latest: ${{ github.ref_name == github.event.repository.default_branch || startsWith(github.ref, 'refs/tags/') }}
|
|
contract_image: "codexstorage/codex-contracts-eth:sha-${{ needs.get-contracts-hash.outputs.hash }}"
|
|
secrets: inherit |