Skip to content

Merge pull request #330 from pwssOrg/18-update-external-dependencies-… #501

Merge pull request #330 from pwssOrg/18-update-external-dependencies-…

Merge pull request #330 from pwssOrg/18-update-external-dependencies-… #501

Workflow file for this run

name: Makefile CI
on:
push:
pull_request:
branches: [ "master", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17.5
ports:
- 26556:5432
env:
POSTGRES_DB: integrity_hash
POSTGRES_USER: coa
POSTGRES_PASSWORD: the_dodo
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Set up environment variable for GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.READ_PACKAGE_TOKEN_FOR_WORKFLOWS }}
run: echo "GITHUB_TOKEN is set to access private packages"
# Add a step to create Maven settings with the GitHub token
- name: Setup Maven Settings
run: |
mkdir -p ~/.m2
cat <<EOF > ~/.m2/settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/pwssOrg/literate-octo-guacamole</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>${{ secrets.READ_PACKAGE_USER_FOR_WORKFLOWS }}</username>
<password>${{ secrets.READ_PACKAGE_TOKEN_FOR_WORKFLOWS }}</password>
</server>
</servers>
</settings>
EOF
- name: Set DB environment variables
run: |
echo "INTEGRITY_HASH_DB_USER=coa" >> $GITHUB_ENV
echo "INTEGRITY_HASH_DB_PASSWORD=the_dodo" >> $GITHUB_ENV
- name: Install dependencies
env:
SPRING_PROFILES_ACTIVE: build
run: make build