Skip to content

Merge pull request #56 from adoptium/dependabot/maven/org.codehaus.mo… #124

Merge pull request #56 from adoptium/dependabot/maven/org.codehaus.mo…

Merge pull request #56 from adoptium/dependabot/maven/org.codehaus.mo… #124

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Marketplace build
on:
pull_request:
branches: [ main, production ]
push:
branches: [ main, production ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
submodules: true
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Get submodule SHA
id: get-submodule-sha
run: echo "SUBMODULE_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
working-directory: api.adoptium.net
# - name: Cache api.adoptium.net build
# uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
# id: cache-api
# with:
# path: api.adoptium.net/**/target
# key: api-build-${{ steps.get-submodule-sha.outputs.SUBMODULE_SHA }}
# restore-keys: |
# api-build-${{ steps.get-submodule-sha.outputs.SUBMODULE_SHA }}
- name: Build api
# if: steps.cache-api.outputs.cache-hit != 'true'
working-directory: api.adoptium.net
run: ./mvnw --batch-mode clean install -Padoptium
- name: Build marketplace
run: ./mvnw --batch-mode clean install
- name: Upload yaml schema
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: schema.yaml
path: adoptium-marketplace-schema/target/generated/openapi.yaml
- name: Upload json schema
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: schema.json
path: adoptium-marketplace-schema/target/generated/openapi.json
- name: Upload example data
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: example.json
path: adoptium-marketplace-schema-tests/src/test/resources/net/adoptium/marketplace/schema/example.json