diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 84f794c47f..0216b7e25a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -76,20 +76,20 @@ jobs: - name: Fetch release binaries run: | - aws s3 cp s3://vorc/iroh-linux-amd64-${{ github.event.inputs.base_hash }} bins/linux/amd64/iroh - aws s3 cp s3://vorc/iroh-relay-linux-amd64-${{ github.event.inputs.base_hash }} bins/linux/amd64/iroh-relay - aws s3 cp s3://vorc/iroh-dns-server-linux-amd64-${{ github.event.inputs.base_hash }} bins/linux/amd64/iroh-dns-server + aws s3 cp s3://vorc/iroh-linux-amd64-${{ inputs.base_hash }} bins/linux/amd64/iroh + aws s3 cp s3://vorc/iroh-relay-linux-amd64-${{ inputs.base_hash }} bins/linux/amd64/iroh-relay + aws s3 cp s3://vorc/iroh-dns-server-linux-amd64-${{ inputs.base_hash }} bins/linux/amd64/iroh-dns-server - aws s3 cp s3://vorc/iroh-linux-aarch64-${{ github.event.inputs.base_hash }} bins/linux/arm64/iroh - aws s3 cp s3://vorc/iroh-relay-linux-aarch64-${{ github.event.inputs.base_hash }} bins/linux/arm64/iroh-relay - aws s3 cp s3://vorc/iroh-dns-server-linux-aarch64-${{ github.event.inputs.base_hash }} bins/linux/arm64/iroh-dns-server + aws s3 cp s3://vorc/iroh-linux-aarch64-${{ inputs.base_hash }} bins/linux/arm64/iroh + aws s3 cp s3://vorc/iroh-relay-linux-aarch64-${{ inputs.base_hash }} bins/linux/arm64/iroh-relay + aws s3 cp s3://vorc/iroh-dns-server-linux-aarch64-${{ inputs.base_hash }} bins/linux/arm64/iroh-dns-server - name: Build Docker image (iroh) uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event.inputs.publish }} - tags: n0computer/iroh:latest,n0computer/iroh:${{ github.event.inputs.release_version }} + push: ${{ inputs.publish }} + tags: n0computer/iroh:latest,n0computer/iroh:${{ inputs.release_version }} target: iroh platforms: linux/amd64,linux/arm64/v8 file: docker/Dockerfile.ci @@ -98,8 +98,8 @@ jobs: uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event.inputs.publish }} - tags: n0computer/iroh-relay:latest,n0computer/iroh-relay:${{ github.event.inputs.release_version }} + push: ${{ inputs.publish }} + tags: n0computer/iroh-relay:latest,n0computer/iroh-relay:${{ inputs.release_version }} target: iroh-relay platforms: linux/amd64,linux/arm64/v8 file: docker/Dockerfile.ci @@ -108,8 +108,8 @@ jobs: uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event.inputs.publish }} - tags: n0computer/iroh-dns-server:latest,n0computer/iroh-dns-server:${{ github.event.inputs.release_version }} + push: ${{ inputs.publish }} + tags: n0computer/iroh-dns-server:latest,n0computer/iroh-dns-server:${{ inputs.release_version }} target: iroh-dns-server platforms: linux/amd64,linux/arm64/v8 file: docker/Dockerfile.ci \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d382045b7..6e1fe273c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,15 @@ on: description: "Upload artifacts" required: true default: "true" + upload_url: + description: "Upload URL" + required: false + default: "" + base_hash: + description: "Commit hash from which to build" + required: false + type: string + default: "" push: tags: - "v*" @@ -122,8 +131,16 @@ jobs: RUSTV: ${{ matrix.rust }} steps: - name: Checkout + if: inputs.base_hash == '' + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Checkout specified commit + if: inputs.base_hash != '' uses: actions/checkout@v4 with: + ref: ${{ inputs.base_hash }} submodules: recursive - name: Set build arch @@ -261,7 +278,7 @@ jobs: - uses: n0-computer/actions-upload-release-asset@main if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') with: - upload_url: ${{ needs.create-release.outputs.upload_url }} + upload_url: ${{ github.event.inputs.upload_url || needs.create-release.outputs.upload_url }} asset_path: ${{ env.ASSET }} docker: