ACS-4814 - Use PR id for library publishing (#3061)

* ACS-4814 Use PR id for library publishing

* ACS-4814 Use PR id for library publishing
This commit is contained in:
Maurizio Cacace 2023-03-14 09:25:48 +01:00 committed by GitHub
parent b939d1c582
commit 680319596a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,7 @@ runs:
if [[ ${{ inputs.branch_name }} =~ ^master.*?$ ]] ; then if [[ ${{ inputs.branch_name }} =~ ^master.*?$ ]] ; then
NEW_LIBRARY_VERSION="$VERSION_IN_PACKAGE_JSON" NEW_LIBRARY_VERSION="$VERSION_IN_PACKAGE_JSON"
else else
NEW_LIBRARY_VERSION="${VERSION_IN_PACKAGE_JSON}-${{ github.run_id }}" NEW_LIBRARY_VERSION="${VERSION_IN_PACKAGE_JSON}-${PR_NUMBER}"
fi fi
./scripts/gh/update-lib-versions.sh "$NEW_LIBRARY_VERSION" "${{ inputs.dry-run }}" ./scripts/gh/update-lib-versions.sh "$NEW_LIBRARY_VERSION" "${{ inputs.dry-run }}"

View File

@ -37,6 +37,7 @@ env:
REPO_SLUG: "alfresco/alfresco-content-app" REPO_SLUG: "alfresco/alfresco-content-app"
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }} NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
jobs: jobs:
publish-docker-registry: publish-docker-registry:
name: "Publish to Quay" name: "Publish to Quay"
@ -126,6 +127,15 @@ jobs:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'npm' cache: 'npm'
- uses: ./.github/actions/setup - uses: ./.github/actions/setup
- name: check PR number
id: action
uses: kamatama41/get-pr-number-action@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: save PR number
shell: bash
run: |
echo "PR_NUMBER=${{ steps.action.outputs.number }}" >> $GITHUB_ENV
- name: publish - name: publish
uses: ./.github/actions/publish-libs uses: ./.github/actions/publish-libs
with: with: