Skip to content

Commit

Permalink
Update GitHub Actions workflows as per security guidelines (#172)
Browse files Browse the repository at this point in the history
* Update GitHub Actions workflows as per security guidelines

* Fix link verification
  • Loading branch information
tony-josi-aws authored Nov 18, 2024
1 parent 27edcd5 commit ad6185c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,20 @@ jobs:
git commit -m 'Update SBOM'
git push -u origin ${{ github.event.inputs.version_number }}
- name: Tag Commit and Push to remote
env:
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
run: |
git tag ${{ github.event.inputs.version_number }} -a -m "coreJSON Library ${{ github.event.inputs.version_number }}"
git tag "$VERSION_NUMBER" -a -m "coreJSON Library $VERSION_NUMBER"
git push origin --tags
- name: Verify tag on remote
env:
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
COMMIT_ID: ${{ github.event.inputs.commit_id }}
run: |
git tag -d ${{ github.event.inputs.version_number }}
git tag -d "$VERSION_NUMBER"
git remote update
git checkout tags/${{ github.event.inputs.version_number }}
git diff ${{ github.event.inputs.commit_id }} tags/${{ github.event.inputs.version_number }}
git checkout tags/"$VERSION_NUMBER"
git diff "$COMMIT_ID" tags/"$VERSION_NUMBER"
create-zip:
needs: tag-commit
name: Create ZIP and verify package for release asset.
Expand All @@ -67,13 +72,15 @@ jobs:
zip -r coreJSON-${{ github.event.inputs.version_number }}.zip coreJSON -x "*.git*"
ls ./
- name: Validate created ZIP
env:
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
run: |
mkdir zip-check
mv coreJSON-${{ github.event.inputs.version_number }}.zip zip-check
mv coreJSON-"$VERSION_NUMBER".zip zip-check
cd zip-check
unzip coreJSON-${{ github.event.inputs.version_number }}.zip -d coreJSON-${{ github.event.inputs.version_number }}
ls coreJSON-${{ github.event.inputs.version_number }}
diff -r -x "*.git*" coreJSON-${{ github.event.inputs.version_number }}/coreJSON/ ../coreJSON/
unzip coreJSON-"$VERSION_NUMBER".zip -d coreJSON-"$VERSION_NUMBER"
ls coreJSON-"$VERSION_NUMBER"
diff -r -x "*.git*" coreJSON-"$VERSION_NUMBER"/coreJSON/ ../coreJSON/
cd ../
- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion tools/coverity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ see the [MISRA.md](https://github.com/FreeRTOS/coreJSON/blob/main/MISRA.md) file

## Getting Started
### Prerequisites
You can run this on a platform supported by Coverity. The list and other details can be found [here](https://sig-docs.synopsys.com/polaris/topics/c_coverity-compatible-platforms.html).
You can run this on a platform supported by Coverity. The list and other details can be found [here](https://documentation.blackduck.com/bundle/coverity-docs/page/deploy-install-guide/topics/supported_platforms_for_coverity_analysis.html).
To compile and run the Coverity target successfully, you must have the following:

1. CMake version > 3.13.0 (You can check whether you have this by typing `cmake --version`)
Expand Down

0 comments on commit ad6185c

Please sign in to comment.