2 Commits

Author SHA1 Message Date
9975c5d1ca Merge branch 'main' into fix-run-bun-in-container
All checks were successful
CI / Test (pull_request) Successful in 24s
2025-01-08 13:54:16 +01:00
3eca1f5516 ci: fix manifest when building multi stage (#9)
All checks were successful
CD / Test (push) Successful in 1m1s
CD / Build and push (amd64) (push) Successful in 1m1s
CD / Build and push (arm64) (push) Successful in 1m43s
CD / Create manifest (push) Successful in 23s
Reviewed-on: #9
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-01-08 13:53:57 +01:00
2 changed files with 34 additions and 4 deletions

View File

@@ -64,8 +64,38 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platform: linux/${{ matrix.arch }} platforms: linux/${{ matrix.arch }}
push: true push: true
provenance: false
tags: | tags: |
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-${{ matrix.arch }}
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:latest
create_manifest:
name: Create manifest
needs:
- build_and_push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Metadata
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Create manifest
run: |
docker manifest create ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:latest \
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-amd64 \
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-arm64
docker manifest push ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:latest

View File

@@ -16,7 +16,7 @@ COPY --from=install /temp/dev/node_modules node_modules
COPY . . COPY . .
RUN bun run build RUN bun run build
FROM base as release FROM base AS release
COPY --from=install /temp/prod/node_modules node_modules COPY --from=install /temp/prod/node_modules node_modules
COPY --from=build /app/dist . COPY --from=build /app/dist .