build #2588
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: build | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
jobs: | |
update-bridgecrew: | |
runs-on: [self-hosted, public, linux, x64] | |
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 | |
sed -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_TOKEN }} | |
WITH_V: true |