Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
First attempt at running workflow with current development maven repos
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Carino <[email protected]>
  • Loading branch information
jadecarino committed Jul 23, 2024
1 parent ed34d1b commit 875380c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: PR build

on:
workflow_dispatch:
pull_request:
branches: [main]
workflow_dispatch:
pull_request:
branches: [main]

env:
NAMESPACE: galasa-dev
IMAGE_TAG: ${{ github.event.number }}

jobs:
build-gradle:
Expand All @@ -23,6 +24,10 @@ jobs:
java-version: '11'
distribution: 'semeru'

- name: Print githash
run: |
echo $GITHUB_SHA > ./gradle.githash
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
Expand All @@ -33,4 +38,10 @@ jobs:
gradle clean build \
-PsourceMaven=https://repo.maven.apache.org/maven2/ \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/gradle/
-PtargetMaven=${{ github.workspace }}/repo
# This Docker image will not be used, it's just to test that the Docker build should work
- name: Build and test Gradle image
run: |
docker build -t gradle-maven-artefacts:${{env.IMAGE_TAG}} --build-arg tag=main --build-arg dockerRepository=harbor.galasa.dev -f dockerfiles/dockerfile.gradle .
docker run --rm gradle-maven-artefacts:${{env.IMAGE_TAG}}
6 changes: 6 additions & 0 deletions dockerfiles/dockerfile.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG dockerRepository
ARG tag
FROM ${dockerRepository}/galasadev/galasa-wrapping:${tag}

COPY repo/ /usr/local/apache2/htdocs/
COPY gradle.githash /usr/local/apache2/htdocs/gradle.githash

0 comments on commit 875380c

Please sign in to comment.