ACS-8676 Deal with upcoming GitHub Actions deprecations #337
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Alfresco Java SDK CI | |
on: | |
push: | |
branches: | |
- release/5.1.N | |
pull_request: | |
branches: | |
- release/5.1.N | |
workflow_dispatch: | |
env: | |
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 | |
CONTENT_SERVICE_SECURITY_BASICAUTH_PASSWORD: ${{ secrets.CONTENT_SERVICE_SECURITY_BASICAUTH_PASSWORD }} | |
CONTENT_SERVICE_SECURITY_BASICAUTH_USERNAME: ${{ secrets.CONTENT_SERVICE_SECURITY_BASICAUTH_USERNAME }} | |
CONTENT_SERVICE_URL: ${{ secrets.CONTENT_SERVICE_URL }} | |
ENVIRONMENT_APA_HOST: apadev-apa.envalfresco.com | |
ENVIRONMENT_HOST: apadev.envalfresco.com | |
ENVIRONMENT_APP: simpleapp | |
AGS_VERSION: 14.9 | |
ACS_VERSION: 7.1.0.1 | |
JAVA_VERSION: 11 | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
build_and_verify: | |
name: "Build and Verify" | |
runs-on: ubuntu-latest | |
needs: | |
- pre-commit | |
env: | |
MAVEN_CLI_OPTS: > | |
source:jar -B -q -e -fae -V -DinstallAtEnd=true -U -Ddoclint=none | |
-Denvironment.host=${ENVIRONMENT_HOST} | |
-Denvironment.apa.host=${ENVIRONMENT_APA_HOST} | |
-Denvironment.application.name=${ENVIRONMENT_APP} | |
-Dags.version=${AGS_VERSION} | |
-Dacs.version=${ACS_VERSION} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Generate ACS Rest API" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
cd alfresco-acs-java-rest-api/alfresco-acs-java-rest-api-lib | |
bash generate.sh | |
- name: "Generate APA Rest API" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
cd alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib | |
bash generate.sh | |
- name: "Build" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: mvn install $MAVEN_CLI_OPTS -DskipTests=true -Dmaven.javadoc.skip=true | |
- name: "Run tests" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: mvn verify $MAVEN_CLI_OPTS -Dlogging.root.level=off -Dspring.main.banner-mode=off | |
publish: | |
name: "Publish" | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name != 'pull_request' | |
needs: | |
- build_and_verify | |
env: | |
MAVEN_CLI_OPTS: > | |
source:jar -B -q -e -fae -V -DinstallAtEnd=true -U -Ddoclint=none | |
-DaltReleaseDeploymentRepository=alfresco-public::default::https://artifacts.alfresco.com/nexus/content/repositories/releases | |
-DaltSnapshotDeploymentRepository=alfresco-public-snapshots::default::https://artifacts.alfresco.com/nexus/content/repositories/snapshots | |
-Denvironment.host=${ENVIRONMENT_HOST} | |
-Denvironment.apa.host=${ENVIRONMENT_APA_HOST} | |
-Denvironment.application.name=${ENVIRONMENT_APP} | |
-Dags.version=${AGS_VERSION} | |
-Dacs.version=${ACS_VERSION} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: "Generate ACS Rest API" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
cd alfresco-acs-java-rest-api/alfresco-acs-java-rest-api-lib | |
bash generate.sh | |
- name: "Generate APA Rest API" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: | | |
cd alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib | |
bash generate.sh | |
- name: "Publish artifacts" | |
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | |
run: mvn deploy $MAVEN_CLI_OPTS -DskipTests=true |