Remove regexes #52
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
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'main' | |
- 'develop' | |
jobs: | |
licenses_report: | |
name: Generating licenses report | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
- name: Creating licenses report | |
env: | |
ORG_GRADLE_PROJECT_repoUsername: ${{ secrets.REPO_USERNAME }} | |
ORG_GRADLE_PROJECT_repoPassword: ${{ secrets.REPO_PASSWORD }} | |
ORG_GRADLE_PROJECT_mavenReleasesRepository: "" | |
run: ./gradlew generateLicenseReport -x build | |
- name: Copy, rename, and remove header | |
run: tail -n +2 ./build/reports/dependency-license/licenses.csv > ./${{ github.event.repository.name }}.csv | |
- name: Setup Git | |
run: | | |
git config --global user.name "icure-dev" | |
git config --global user.email "[email protected]" | |
- name: Setup SSH Keys and known_hosts | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "${{ secrets.REPO_DEPLOY_KEY }}" | |
- name: Publish file to licenses-report | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
git clone [email protected]:icure/licenses-report.git | |
cd licenses-report | |
mv ../${{ github.event.repository.name }}.csv ./java_kotlin/${{ github.event.repository.name }}.csv | |
git add ./java_kotlin/${{ github.event.repository.name }}.csv | |
STATUS=$(git status --porcelain) | |
if [ -n "$STATUS" ]; then | |
git commit -m "Update ${{ github.event.repository.name }}.csv" | |
git push | |
fi |