Skip to content

Commit

Permalink
update dockerfile, added caching
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxfight committed Apr 29, 2024
1 parent 115f945 commit 5b08d49
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
Expand All @@ -44,4 +44,6 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
- name: Checkout Repository
Expand All @@ -21,6 +24,8 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build
run: cargo build --release
with:
cache: 'true'

- name: Package
run: tar -czvf release.tar.gz -C target/release .
Expand All @@ -29,7 +34,7 @@ jobs:
id: publish_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
release.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG APP_NAME
WORKDIR /app

# Install host build dependencies.
RUN apk add --no-cache clang lld musl-dev git
RUN apk add --no-cache clang lld musl-dev git pkgconfig openssl-dev

# Build the application.
# Leverage a cache mount to /usr/local/cargo/registry/
Expand Down

0 comments on commit 5b08d49

Please sign in to comment.