mirror of
https://github.com/aquasecurity/trivy-action.git
synced 2026-05-14 03:02:40 +00:00
chore: comment on deployment steps
This commit is contained in:
@@ -42,26 +42,26 @@ jobs:
|
||||
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
|
||||
run: make test
|
||||
|
||||
- name: Create PR
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.TRIVY_ACTION_DEPLOY_TOKEN }}
|
||||
TRIVY_VERSION: ${{ inputs.trivy_version }}
|
||||
REPO: ${{ github.repository }}
|
||||
BASE_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
run: |
|
||||
gh auth setup-git
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
BRANCH="bump-trivy-${TRIVY_VERSION}"
|
||||
git checkout -b "${BRANCH}"
|
||||
git add action.yaml README.md test/
|
||||
git commit -m "chore(deps): Update trivy to v${TRIVY_VERSION}"
|
||||
git push origin "${BRANCH}"
|
||||
PR_RESPONSE=$(gh api repos/${REPO}/pulls \
|
||||
--method POST \
|
||||
--field title="chore(deps): Update trivy to v${TRIVY_VERSION}" \
|
||||
--field body="This PR was automatically generated by the bump-trivy workflow." \
|
||||
--field base="${BASE_BRANCH}" \
|
||||
--field head="${BRANCH}")
|
||||
echo "Pull Request Number - $(echo "${PR_RESPONSE}" | jq -r '.number')"
|
||||
echo "Pull Request URL - $(echo "${PR_RESPONSE}" | jq -r '.html_url')"
|
||||
# - name: Create PR
|
||||
# env:
|
||||
# GH_TOKEN: ${{ secrets.TRIVY_ACTION_DEPLOY_TOKEN }}
|
||||
# TRIVY_VERSION: ${{ inputs.trivy_version }}
|
||||
# REPO: ${{ github.repository }}
|
||||
# BASE_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
# run: |
|
||||
# gh auth setup-git
|
||||
# git config user.name "github-actions[bot]"
|
||||
# git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
# BRANCH="bump-trivy-${TRIVY_VERSION}"
|
||||
# git checkout -b "${BRANCH}"
|
||||
# git add action.yaml README.md test/
|
||||
# git commit -m "chore(deps): Update trivy to v${TRIVY_VERSION}"
|
||||
# git push origin "${BRANCH}"
|
||||
# PR_RESPONSE=$(gh api repos/${REPO}/pulls \
|
||||
# --method POST \
|
||||
# --field title="chore(deps): Update trivy to v${TRIVY_VERSION}" \
|
||||
# --field body="This PR was automatically generated by the bump-trivy workflow." \
|
||||
# --field base="${BASE_BRANCH}" \
|
||||
# --field head="${BRANCH}")
|
||||
# echo "Pull Request Number - $(echo "${PR_RESPONSE}" | jq -r '.number')"
|
||||
# echo "Pull Request URL - $(echo "${PR_RESPONSE}" | jq -r '.html_url')"
|
||||
|
||||
Reference in New Issue
Block a user