Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): fix docker builds on release & release rebuilds #2712

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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*"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading