Skip to content

Merge branch 'lesnerd:main' into main #7

Merge branch 'lesnerd:main' into main

Merge branch 'lesnerd:main' into main #7

Workflow file for this run

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: |
echo "EVENT NAME: ${{ github.event_name }}"
if [ "${{ github.event_name }}" == "push" ]; then
echo "github.commit: ${{ toJson(github.event.commits[0]) }}"
JSON=$(jq -n \
--arg hash "${{ github.event.commits[0].id }}" \
--arg author "${{ github.event.commits[0].author.name }}" \
--arg date "${{ github.event.commits[0].timestamp }}" \
--arg message "${{ github.event.commits[0].message }}" \
'$ARGS.named'
)
echo "$JSON"
fi
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "====== Pull Request ======"
echo "Review: ${{ github.event.review }}"
echo "Reviewers: ${{ github.event.reviewers }}"
echo "Review: ${{ toJson(github.event.review) }}"
echo "Reviewers: ${{ toJson(github.event.reviewers) }}"
fi
if [ "${{ github.event_name }}" == "release" ]; then
echo "====== Release ======"
echo "Release: ${{ toJson(github.event.release) }}"
fi
echo "event object:"
echo "github.event: ${{ toJson(github.event) }}"