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

ci: switch release workflow to github runners #2346

Merged
merged 9 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
11 changes: 8 additions & 3 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
build-image:
name: Build ${{ matrix.platform }} image
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
timeout-minutes: 120
strategy:
matrix:
include:
- runner: ["self-hosted", "linux", "x64", "ubuntu-platform"]
- runner: ubuntu-24.04
platform: linux/amd64
- runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
- runner: ubuntu-24.04
platform: linux/arm64
steps:
- name: Check out repo
Expand All @@ -54,6 +54,10 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.platform == 'linux/arm64' }}
shumkov marked this conversation as resolved.
Show resolved Hide resolved

- name: Build and push by digest
uses: ./.github/actions/docker
id: docker_build
Expand Down Expand Up @@ -134,6 +138,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create manifest list and push
working-directory: ${{ env.DIGEST_DIR_PATH }}
run: |
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,7 @@ COPY --parents \
packages/check-features \
/platform/

RUN if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \
export RELEASE="--release" ; \
fi && \
source $HOME/.cargo/env && \
RUN source $HOME/.cargo/env && \
shumkov marked this conversation as resolved.
Show resolved Hide resolved
source /root/env && \
cargo chef prepare $RELEASE --recipe-path recipe.json
shumkov marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -335,7 +332,7 @@ SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"]

WORKDIR /platform

COPY --from=build-planner /platform/recipe.json /platform/.cargo /platform/
COPY --from=build-planner --parents /platform/recipe.json /platform/.cargo /
shumkov marked this conversation as resolved.
Show resolved Hide resolved

# Build dependencies - this is the caching Docker layer!
RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \
Expand Down
Loading