Merge branch 'lesnerd:main' into main #2
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
name: "JFrog CLI" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: [created] | |
#on: release | |
permissions: | |
# This is required for requesting the OIDC token | |
# id-token: write | |
# This is required for actions/checkout | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JFrog CLI | |
uses: jfrog/setup-jfrog-cli@v4 | |
env: | |
JF_URL: ${{ vars.JF_URL }} | |
JF_USER: ${{ secrets.JF_USER }} | |
JF_PASSWORD: ${{ secrets.JF_PASSWORD }} | |
RT_URL_L: ${{ vars.JF_URL }} | |
- name: Run JFrog CLI | |
run: | | |
jf -v | |
echo artifactory url: ${{ vars.JF_URL }} | |
echo "Ping the server" | |
jf rt ping | |
echo "jf show config" | |
jf config show > f1 | |
cat f1 | |
evidence-collection: | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JFrog CLI | |
uses: jfrog/setup-jfrog-cli@v4 | |
- name: Run jq | |
uses: sergeysova/jq-action@v2 | |
env: | |
JF_URL: ${{ vars.JF_URL }} | |
JF_USER: ${{ secrets.JF_USER }} | |
JF_PASSWORD: ${{ secrets.JF_PASSWORD }} | |
- name: Release Info Evidence | |
run: | | |
if [ "${{ github.event_name }}" == "push" ]; then | |
echo "Push event" | |
JSON=$(jq -n \ | |
--arg commit ${{ github.event.commits[0].id }} \ | |
--arg review "Marie Lupen" \ | |
--arg reviewers "Maries Lupens" \ | |
'$ARGS.named' | |
) | |
echo "$JSON" | |
fi | |
# print the code review information if it is a pull request | |
echo "event name: ${{ github.event_name }}" | |
echo "=========================" | |
if [ "${{ github.event_name }}" == "pull_request" ]; then | |
echo "Review: ${{ github.event.review }}" | |
echo "Reviewers: ${{ github.event.reviewers }}" | |
echo "Review: ${{ toJson(github.event.review) }}" | |
echo "Reviewers: ${{ toJson(github.event.reviewers) }}" | |
fi | |
# print the release information if it is a release | |
if [ "${{ github.event_name }}" == "release" ]; then | |
echo "Release" | |
echo "Release: ${{ toJson(github.event.release) }}" | |
fi | |
echo "event object:" | |
echo "github.event: ${{ toJson(github.event) }}" |