name: Release Launcher Docker Image # cancel-in-progress is false to avoid orphaning blobs mid-push; see RELEASES.md. concurrency: group: retag-launcher-${{ github.ref }} cancel-in-progress: false 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 workflow_call: inputs: source-tag: required: true type: string release-tag: required: true type: string jobs: retag-launcher-image: name: "Retag launcher image for release" runs-on: warp-ubuntu-2404-x64-2x environment: production permissions: contents: read steps: - name: Login to Docker Hub uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PAT }} - name: Install skopeo run: | sudo apt-get update sudo apt-get install -y skopeo - name: Verify source image exists env: SOURCE_TAG: ${{ inputs.source-tag }} run: | if ! skopeo inspect docker://nearone/mpc-launcher:$SOURCE_TAG > /dev/null 2>&1; then echo "Source image nearone/mpc-launcher:$SOURCE_TAG does not exist" exit 1 fi - name: Retag image env: SOURCE_TAG: ${{ inputs.source-tag }} RELEASE_TAG: ${{ inputs.release-tag }} run: | skopeo copy \ docker://nearone/mpc-launcher:$SOURCE_TAG \ docker://nearone/mpc-launcher:$RELEASE_TAG