Scanning all frameworks by default (#62) #33
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: Check release with upstream | |
on: | |
workflow_dispatch: # Allow manual triggers | |
push: | |
branches: [ main ] | |
env: | |
BOT_NAME: "github-actions[bot]" | |
BOT_EMAIL: "github-actions[bot]@users.noreply.github.com" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update repo | |
run: | | |
. ./update.sh | |
echo "latest=${LATEST}" >> $GITHUB_ENV | |
echo "current=${CURRENT}" >> $GITHUB_ENV | |
git clone https://github.com/${{ github.repository }} github-action; cd github-action | |
export RELEASE=$(git for-each-ref --format="%(refname:short)" --sort=-authordate --count=1 refs/tags || true) | |
rm -rf github-action | |
echo "release=${RELEASE}" >> $GITHUB_ENV | |
- uses: peter-evans/create-pull-request@v4 | |
if: env.latest != env.current | |
with: | |
add-paths: | | |
Dockerfile | |
commit-message: "Bump kubescape version to ${{ env.latest }}" | |
signoff: true | |
title: "[Kubescape] Bump kubescape version to ${{ env.latest }}" | |
body: | | |
# Overview | |
This PR bumps the `kubescape` version used in this action's Docker image to version ${{ env.latest }} | |
base: ${{ github.head_ref }} | |
branch: kubescape-bump-${{ env.latest }}-${{ github.head_ref || github.ref_name }} | |
delete-branch: true | |
- name: Release | |
if: env.release != env.current | |
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d | |
with: | |
tag_name: ${{ env.current }} | |
body: Bump kubescape version to ${{ env.current }} |