Skip to content

Commit

Permalink
feat: add web base image
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Dec 8, 2023
1 parent 2e4ba1d commit 6cdb61a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,41 @@ jobs:
mkdir output-client-base
tar -C output-client-base -xf output-client-base.tar
- name: Build web-base
uses: docker/build-push-action@v5
with:
context: web-base
outputs: type=oci,dest=output-web-base.tar
tags: ghcr.io/diracgrid/diracx-web/base:latest
platforms: linux/amd64,linux/arm64
- name: Extract web-base
run: |
mkdir output-web-base
tar -C output-web-base -xf output-web-base.tar
- name: Push images
if: ${{ github.event_name != 'pull_request' && github.repository == 'DIRACGrid/container-images' && github.ref_name == 'main' }}
run: |
set -x
image_version=$(date +'%Y.%m.%d')
# Push diracx base images
# Check how many tags already exist for the current date and increment the version
count=$(oras repo tags "ghcr.io/diracgrid/diracx/base" | { grep -c "${image_version}" || true; } )
image_version=${image_version}.${count}
echo "Pushing version ${image_version}"
echo "Pushing version ${image_version} for base images"
for image_name in base services-base client-base; do
image_repo=ghcr.io/diracgrid/diracx/${image_name}
oras cp --from-oci-layout "$PWD/output-${image_name}:latest" "${image_repo}:latest,${image_version}"
done
# Push diracx-web image
count=$(oras repo tags "ghcr.io/diracgrid/diracx-web/base" | { grep -c "${image_version}" || true; } )
image_version=${image_version}.${count}
echo "Pushing version ${image_version} for web-base image"
image_repo=ghcr.io/diracgrid/diracx-web/base
oras cp --from-oci-layout "$PWD/output-web-base:latest" "${image_repo}:latest,${image_version}"
5 changes: 5 additions & 0 deletions web-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:16-alpine

# Install bash and git
RUN apk add --no-cache bash git

0 comments on commit 6cdb61a

Please sign in to comment.