Skip to content

Commit

Permalink
no longer use caches
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemand committed Feb 13, 2024
1 parent 8819425 commit aead9fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
jobs:

build-and-push:
if: startsWith(github.ref, 'refs/tags/recover-id-object/')
runs-on: ubuntu-latest
environment: production
steps:
Expand All @@ -24,6 +25,12 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract Cargo package version
id: cargo_version
run: |
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
echo "Extracted version is $VERSION"
echo "::set-output name=version::$VERSION"
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand All @@ -32,6 +39,4 @@ jobs:
push: true
build-args: |
build_image=${{ env.RUST_VERSION }}
tags: concordium/recover-id-object:latest
cache-from: type=registry,ref=concordium/recover-id-object:latest
cache-to: type=inline
tags: concordium/recover-id-object:${{ steps.cargo_version.outputs.version }}
7 changes: 1 addition & 6 deletions recover-id-object/scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ FROM ${build_image} AS build
WORKDIR /usr/app/recover-id-object

COPY recover-id-object/Cargo.toml recover-id-object/Cargo.lock .
COPY deps /usr/app/deps
RUN mkdir src && echo 'fn main() { println!("Dummy!"); }' > ./src/main.rs

RUN cargo build --release --locked

RUN rm src/*.rs
COPY recover-id-object/src ./src
COPY deps /usr/app/deps
RUN cargo build --release --locked

FROM ${base_image}
Expand Down

0 comments on commit aead9fc

Please sign in to comment.