diff --git a/.github/workflows/docker-reusable.yml b/.github/workflows/docker-reusable.yml index 2a614316..e74927b4 100644 --- a/.github/workflows/docker-reusable.yml +++ b/.github/workflows/docker-reusable.yml @@ -34,6 +34,11 @@ on: description: Set latest tag for Docker images required: false type: boolean + tag_stable: + default: false + description: Set stable tag for Docker images + required: false + type: boolean tag_sha: default: true description: Set Git short commit as Docker tag @@ -73,6 +78,7 @@ env: NIMFLAGS: ${{ inputs.nimflags }} NAT_IP_AUTO: ${{ inputs.nat_ip_auto }} TAG_LATEST: ${{ inputs.tag_latest }} + TAG_STABLE: ${{ inputs.tag_stable }} TAG_SHA: ${{ inputs.tag_sha }} TAG_SUFFIX: ${{ inputs.tag_suffix }} CONTRACT_IMAGE: ${{ inputs.contract_image }} @@ -185,6 +191,7 @@ jobs: version: ${{ steps.meta.outputs.version }} needs: [build, compute] steps: + - name: Docker - Variables run: | # Adjust custom suffix when set and @@ -235,6 +242,7 @@ jobs: tags: | type=semver,pattern={{version}} type=raw,enable=${{ env.TAG_RAW }},value=latest + type=raw,enable=${{ env.TAG_STABLE }},value=stable type=sha,enable=${{ env.TAG_SHA }} - name: Docker - Login to Docker Hub diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1a1573bb..3a633a81 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,7 +18,6 @@ on: - '!docker/docker-entrypoint.sh' workflow_dispatch: - jobs: get-contracts-hash: runs-on: ubuntu-latest @@ -40,5 +39,6 @@ jobs: needs: get-contracts-hash with: tag_latest: ${{ github.ref_name == github.event.repository.default_branch || startsWith(github.ref, 'refs/tags/') }} + tag_stable: ${{ startsWith(github.ref, 'refs/tags/') }} contract_image: "codexstorage/codex-contracts-eth:sha-${{ needs.get-contracts-hash.outputs.hash }}" secrets: inherit \ No newline at end of file