-
Notifications
You must be signed in to change notification settings - Fork 29
31 lines (30 loc) · 1.1 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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