Release Node Docker Image #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Node Docker Image | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| source-tag: | |
| description: "Source image tag to retag for release (e.g., 'main-abc1234')" | |
| required: true | |
| type: string | |
| release-tag: | |
| description: "Release tag for the image (e.g., '3.0.4')" | |
| required: true | |
| type: string | |
| repository: | |
| description: "Target repository name (default: 'mpc-node')" | |
| required: false | |
| type: string | |
| default: mpc-node | |
| jobs: | |
| retag-node-image: | |
| name: "Retag node image for release" | |
| runs-on: warp-ubuntu-2404-x64-2x | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Install skopeo | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y skopeo | |
| - name: Verify source image exists | |
| env: | |
| SOURCE_TAG: ${{ github.event.inputs.source-tag }} | |
| run: | | |
| if ! skopeo inspect docker://nearone/mpc-node:$SOURCE_TAG > /dev/null 2>&1; then | |
| echo "❌ Source image nearone/mpc-node:$SOURCE_TAG does not exist" | |
| exit 1 | |
| fi | |
| - name: Retag image | |
| env: | |
| SOURCE_TAG: ${{ github.event.inputs.source-tag }} | |
| REPOSITORY: ${{ github.event.inputs.repository }} | |
| RELEASE_TAG: ${{ github.event.inputs.release-tag }} | |
| run: | | |
| skopeo copy \ | |
| docker://nearone/mpc-node:$SOURCE_TAG \ | |
| docker://nearone/$REPOSITORY:$RELEASE_TAG |