Skip to content

task: Test first GHA workflow [DHIS2-18615] #10

task: Test first GHA workflow [DHIS2-18615]

task: Test first GHA workflow [DHIS2-18615] #10

Workflow file for this run

name: Hello World Pipeline
on:
pull_request:
# For this to work, this workflow needs to be on master https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_run
# workflow_run:
# workflows: ["Check formatting"]
# types:
# - completed
jobs:
say-hello:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
# Set up Maven
- name: Set up Maven
run: |
sudo apt-get install maven
echo "On branch: $GITHUB_REF_NAME"
echo "Git commit: ${{ github.sha }}""
# Run Maven build
- name: Build with Maven
run: mvn --threads 4 --batch-mode --no-transfer-progress clean install --update-snapshots --file ./dhis-2/pom.xml -DskipTests
- name: Sync war
run: |
echo "Syncing WAR ..."
curl "https://raw.githubusercontent.com/dhis2/dhis2-server-setup/master/ci/scripts/copy-war-s3.sh" -O
chmod +x copy-war-s3.sh
./copy-war-s3.sh dev $GITHUB_REF_NAME