Skip to content

Commit

Permalink
ci: docker image always released as -dev (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek authored Nov 29, 2024
1 parent e811ad4 commit 0f73452
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ runs:
platforms: ${{ inputs.platform }}
secret-files: |
AWS=${{ env.HOME }}/.aws/credentials
build-args: ${{ steps.sccache.outputs.env_vars }}
build-args: |
CARGO_BUILD_PROFILE=${{ inputs.cargo_profile }}
${{ steps.sccache.outputs.env_vars }}
cache-from: ${{ steps.layer_cache_settings.outputs.cache_from }}
cache-to: ${{ steps.layer_cache_settings.outputs.cache_to }}
outputs: type=image,name=${{ inputs.image_org }}/${{ inputs.image_name }},push-by-digest=${{ inputs.push_tags != 'true' }},name-canonical=true,push=true
2 changes: 2 additions & 0 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
cache_endpoint: ${{ vars.CACHE_S3_ENDPOINT }}
cache_access_key_id: ${{ secrets.CACHE_KEY_ID }}
cache_secret_access_key: ${{ secrets.CACHE_SECRET_KEY }}
# On release, we generate a new "base" image, so we need to save cache to name manifest, like '.../drive'
cache_to_name: ${{ github.event_name == 'release' && 'true' || 'false' }}

- name: Export digest
run: |
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else e
# Switch to clang
RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc

# Select whether we want dev or release
ONBUILD ARG CARGO_BUILD_PROFILE=dev

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

Expand Down Expand Up @@ -326,6 +323,10 @@ RUN --mount=type=secret,id=AWS \
--no-track \
--no-confirm


# Select whether we want dev or release
ONBUILD ARG CARGO_BUILD_PROFILE=dev

#
# Rust build planner to speed up builds
#
Expand Down

0 comments on commit 0f73452

Please sign in to comment.