Skip to content

Commit

Permalink
refactor to get version properly
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey.shulika committed Jan 3, 2024
1 parent d757bdc commit 72b0948
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@ on:
env:
APP_NAME: ${{ github.repository }}
BRANCH: ${{ github.ref }}
runsOn: "ubuntu-20.04"

jobs:
prebuild-job:
name: Prebuild Job
uses: th2-net/.github/.github/workflows/compound-prebuild-java-dev-workflow.yml@main
with:
runsOn: ${{ env.runsOn }}

check_licenses:
runs-on: ubuntu-latest
runs-on: ${{ env.runsOn }}
needs: [prebuild-job]

steps:
- name: checkout actions
uses: actions/checkout@v4
Expand All @@ -33,16 +42,16 @@ jobs:
run: ./check_licenses.sh java
id: run_script

- name: Get version
run:
echo "${{ github.ref }}" | awk -F '/' '{print $NF}' > $VERSION
echo "${{ github.repository }}" | awk -F '/' '{print $NF}' > $APP_NAME
# - name: Get version
# run:
# echo "${{ github.ref }}" | awk -F '/' '{print $NF}' > $VERSION
# echo "${{ github.repository }}" | awk -F '/' '{print $NF}' > $APP_NAME

- name: Uploading results
if: always()
uses: actions/upload-artifact@v3
with:
name: licenses_check-${{ env.APP_NAME }}-${{ env.VERSION }}
name: licenses_check-${{ needs.prebuild-job.outputs.version }}
path: ./licenses_check/

- name: Results checking
Expand Down

0 comments on commit 72b0948

Please sign in to comment.