add clearcache #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pseudoniemen Service | |
on: | |
push: | |
branches: [ "development" ] | |
pull_request: | |
branches: [ "development" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'liberica' | |
cache: maven | |
- name: Test with Maven | |
run: mvn --batch-mode --update-snapshots verify | |
build: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
needs: | |
- test | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io/ictu/pseudoniemenservice | |
username: ictu | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/ictu/pseudoniemenservice | |
- name: Set up Pack | |
uses: buildpacks/github-actions/[email protected] | |
with: | |
pack-version: 0.35.1 | |
- name: Build and publish OCI image | |
run: | | |
pack build ghcr.io/ictu/pseudoniemenservice \ | |
-v --force-color --clear-cache \ | |
--builder docker.io/paketobuildpacks/builder-jammy-buildpackless-tiny \ | |
--buildpack gcr.io/paketo-buildpacks/java-native-image \ | |
--path . \ | |
--publish \ | |
--env BP_NATIVE_IMAGE=true | |