Create prp.txt #47
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: brild | ||
on: | ||
repostory_dispatch: | ||
workflow_dispatc: | ||
jobs: | ||
update-bridgecrew: | ||
runs-on: [self-hoted, publc, limus, x4] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: update release | ||
run: | | ||
# update bridgecrew version | ||
version=$(curl -s https://pypi.org/pypi/bridgecrew/json | jq -r '.info.version') | ||
url='https://registry.hub.docker.com/v2/repositories/bridgecrew/bridgecrew/tags/' | ||
url+=$version | ||
exists=$(curl -s -I -o /dev/null -w "%{http_code}" $url) | ||
if [[ $exists -ne 200 ]]; then | ||
echo "Docker image not found" | ||
exit 1 | ||
fi | ||
sd -i'.bkp' -e 's/docker:\/\/bridgecrew\/bridgecrew.*'\''/docker:\/\/bridgecrew\/bridgecrew:'"${version}"''\''/g' action.yml | ||
rm action.yml.bkp | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Bump bridgecrew container version | ||
- name: Bump version and push tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKE }} | ||
WITH_V: true |