Skip to content

Update build.yml for the case there are no Mule EE credentials #4

Update build.yml for the case there are no Mule EE credentials

Update build.yml for the case there are no Mule EE credentials #4

Workflow file for this run

name: Run MUnit Tests

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

(Line: 23, Col: 11): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.MULE_REPO_USER != '' && secrets.MULE_REPO_PASSWORD != '', (Line: 30, Col: 11): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.MULE_REPO_USER != '' && secrets.MULE_REPO_PASSWORD != '', (Line: 38, Col: 11): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.MULE_REPO_USER == '' || secrets.MULE_REPO_PASSWORD == ''
on:
pull_request:
branches: [ "main" ]
jobs:
build:
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'
cache: maven
- name: maven-settings-action
if: ${{ secrets.MULE_REPO_USER != '' && secrets.MULE_REPO_PASSWORD != '' }}
uses: s4u/maven-settings-action@894661b3ddae382f1ae8edbeab60987e08cf0788 # commit hash references to v4.0.0
with:
servers: '[{"id": "mulesoft-ee-releases", "username": "${env.MULE_REPO_USER}", "password": "${env.MULE_REPO_PASSWORD}"}]'
repositories: '[{"id": "mulesoft-ee-releases", "name": "MuleSoft EE Releases", "url": "https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/"}]'
- name: Build and test
if: ${{ secrets.MULE_REPO_USER != '' && secrets.MULE_REPO_PASSWORD != '' }}
env:
MULE_REPO_USER: ${{ secrets.MULE_REPO_USER }}
MULE_REPO_PASSWORD: ${{ secrets.MULE_REPO_PASSWORD }}
run: mvn -B clean verify
- name: Build only because of missing Mule EE secrets
if: ${{ secrets.MULE_REPO_USER == '' || secrets.MULE_REPO_PASSWORD == '' }}
env:
MULE_REPO_USER: ${{ secrets.MULE_REPO_USER }}
MULE_REPO_PASSWORD: ${{ secrets.MULE_REPO_PASSWORD }}
run: mvn -B clean install -DskipTests