Answers for "github workflow working directory"

1

github run workflow only in set directory

# for some to me unknown reason am I unable to add the source. so here it is:
# https://github.community/t/use-working-directory-for-entire-job/16747/2?u=zwazel

name: Java CI with Maven

on:
  push:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      working-directory: ./JavaServer

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 16
      uses: actions/setup-java@v2
      with:
        java-version: '16'
        distribution: 'adopt'
        cache: maven
    - name: Build with Maven
      run: mvn -B package --file pom.xml
      working-directory: ${{env.working-directory}}
Posted by: Guest on September-13-2021

Browse Popular Code Answers by Language