Skip to content

Refactor downloading Docker Compose bundle #152

Refactor downloading Docker Compose bundle

Refactor downloading Docker Compose bundle #152

Workflow file for this run

name: Run Java tests, push image to Docker hub and run e2e tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
run_java_tests:
name: Run Java tests
uses: ./.github/workflows/run-java-tests.yml
push_to_registry:
needs: run_java_tests
name: Build & Push docker image to Docker Hub
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.JORE4_DOCKERHUB_USER }}
password: ${{ secrets.JORE4_DOCKERHUB_TOKEN }}
- name: Build and push dev builds to Docker Hub
run: |
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--cache-from type=registry,ref=$IMAGE_NAME:builder \
--cache-to type=registry,ref=$IMAGE_NAME:builder,mode=max \
--tag $IMAGE_NAME:builder \
.
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--cache-from type=registry,ref=$IMAGE_NAME:builder \
--tag $IMAGE_NAME:$COMMIT_ID \
.
- name: Build and push :latest tag to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker buildx build \
--push \
--platform linux/amd64,linux/arm64 \
--cache-from type=registry,ref=$IMAGE_NAME:builder \
--tag $IMAGE_NAME:latest \
.
run_cypress_tests:
needs:
- run_java_tests
- push_to_registry
uses: ./.github/workflows/run-cypress-tests.yml