Skip to content

Use buildpackless builder #45

Use buildpackless builder

Use buildpackless builder #45

Workflow file for this run

name: Build container
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
run-clippy:
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo clippy --all-targets --all-features -- -D warnings
run-tests:
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo test --locked
build-container:
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v4
- id: setup-pack
uses: buildpacks/github-actions/[email protected]
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: build-image
run: |
pack build ghcr.io/simonerm/imtrand:next \
--buildpack paketo-community/rust \
--builder paketobuildpacks/builder-jammy-buildpackless-base:latest \
--cache-image ghcr.io/simonerm/imtrand-cache:next \
--publish