chore: update yarn version #50

Merged
dominik merged 2 commits from chore/update_yarn into main 2025-05-12 07:29:08 +00:00
6 changed files with 6115 additions and 3890 deletions

View file

@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Build an image from Dockerfile - name: Build an image from Dockerfile
run: docker build -t git.dominikstahl.dev/dhbw-we/meetup:${{ github.sha }} . run: docker buildx build -t meetup_trivy .
- name: Install Trivy - name: Install Trivy
run: | run: |
@ -23,8 +23,8 @@ jobs:
- name: Run Trivy vulnerability scanner - name: Run Trivy vulnerability scanner
run: | run: |
trivy image --exit-code 1 --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed --no-progress --format table git.dominikstahl.dev/dhbw-we/meetup:${{ github.sha }} trivy image --exit-code 1 --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed --no-progress --format table meetup_trivy
trivy image --exit-code 1 --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed --no-progress --format json git.dominikstahl.dev/dhbw-we/meetup:${{ github.sha }} > trivy-report.json trivy image --exit-code 1 --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed --no-progress --format json meetup_trivy > trivy-report.json
- name: Upload Trivy report - name: Upload Trivy report
uses: forgejo/upload-artifact@v4 uses: forgejo/upload-artifact@v4
@ -33,6 +33,5 @@ jobs:
- name: Clean up Docker - name: Clean up Docker
run: | run: |
docker builder prune -af --keep-storage 2GB docker buildx prune --filter=until=48h -f
docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) docker image rm meetup_trivy
docker image prune -f

View file

@ -45,6 +45,7 @@ jobs:
with: with:
push: true push: true
tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}} tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}}
cache-from: type=registry,ref=git.dominikstahl.dev/${{ env.REPO }}:buildcache
- name: Build and push (push_tag) - name: Build and push (push_tag)
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6
@ -52,6 +53,7 @@ jobs:
with: with:
push: true push: true
tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }},git.dominikstahl.dev/${{ env.REPO }}:latest tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }},git.dominikstahl.dev/${{ env.REPO }}:latest
cache-from: type=registry,ref=git.dominikstahl.dev/${{ env.REPO }}:buildcache
- name: Build and push (push_branch) - name: Build and push (push_branch)
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6
@ -59,8 +61,9 @@ jobs:
with: with:
push: true push: true
tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }} tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }}
cache-from: type=registry,ref=git.dominikstahl.dev/${{ env.REPO }}:buildcache
cache-to: type=registry,ref=git.dominikstahl.dev/${{ env.REPO }}:buildcache,mode=max
- name: Clean up Docker - name: Clean up Docker
run: | run: |
docker builder prune -af --keep-storage 2GB docker buildx prune --filter=until=48h -f
docker image prune -f

1
.yarnrc.yml Normal file
View file

@ -0,0 +1 @@
nodeLinker: node-modules

View file

@ -4,13 +4,15 @@ FROM node:22-alpine@sha256:ad1aedbcc1b0575074a91ac146d6956476c1f9985994810e4ee02
FROM base AS deps FROM base AS deps
WORKDIR /app WORKDIR /app
COPY package.json yarn.lock ./ RUN corepack enable
COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
# ----- Build ----- # ----- Build -----
FROM base AS builder FROM base AS builder
WORKDIR /app WORKDIR /app
RUN corepack enable
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
RUN yarn build RUN yarn build

View file

@ -43,5 +43,5 @@
"tw-animate-css": "1.2.9", "tw-animate-css": "1.2.9",
"typescript": "5.8.3" "typescript": "5.8.3"
}, },
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" "packageManager": "yarn@4.9.1"
} }

9980
yarn.lock

File diff suppressed because it is too large Load diff