Skip to content

Validate externally passed Rust toolchain identifiers (#1817) #314

Validate externally passed Rust toolchain identifiers (#1817)

Validate externally passed Rust toolchain identifiers (#1817) #314

Workflow file for this run

name: release-verifiable-image
on:
push:
branches:
- "master"
release:
types:
- edited
- prereleased
- published
env:
IMAGE_NAME: useink/contracts-verifiable
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
environment: master_and_tags
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Build and push Docker image from master
if: ${{ github.event_name == 'push' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./build-image/Dockerfile
push: true
build-args: |
CARGO_CONTRACT_GIT=https://github.com/use-ink/cargo-contract
CARGO_CONTRACT_BRANCH=master
tags: |
${{ env.IMAGE_NAME }}:master
${{ env.IMAGE_NAME }}:latest
# Store the version, stripping any v-prefix
- name: Write release version
if: ${{ github.event_name == 'release' }}
run: |
GH_TAG=${{ github.event.release.tag_name }}
echo Published github tag: $GH_TAG
echo "DOCKER_TAG=${GH_TAG#v}" >> $GITHUB_ENV
- name: Build and push Docker image from release
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./build-image/Dockerfile
push: true
build-args: |
CARGO_CONTRACT_GIT=https://github.com/use-ink/cargo-contract
CARGO_CONTRACT_TAG=${{ github.event.release.tag_name }}
tags: ${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG }}