forked from kubearmor/KubeArmor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubearmor#628 from Ankurk99/branchstable
update stable tag to point to the latest version release branch
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
branches: | ||
- 'main' | ||
|
||
paths: | ||
paths: | ||
- 'STABLE-RELEASE' | ||
|
||
name: KubeArmor stable release | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
branches: | ||
- 'v*' | ||
|
||
name: KubeArmor stable release update | ||
|
||
jobs: | ||
build: | ||
name: Create KubeArmor Release - 18.04 | ||
if: github.repository == 'kubearmor/kubearmor' | ||
runs-on: ubuntu-18.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout KubeArmor code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Pull Docker Hub image | ||
id: match | ||
run: | | ||
value=`cat STABLE-RELEASE` | ||
if [ ${{ github.ref }} == $value ]; then | ||
docker pull docker.io/kubearmor/kubearmor:$value | ||
docker image tag kubearmor/kubearmor:$value kubearmor/kubearmor:stable | ||
echo ::set-output name=tag::true | ||
else | ||
echo ::set-output name=tag::false | ||
fi | ||
- name: Login to Docker Hub | ||
if: steps.match.outputs.tag == 'true' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_AUTHTOK }} | ||
|
||
- name: Push KubeArmor images to Docker | ||
if: steps.match.outputs.tag == 'true' | ||
run: | | ||
./KubeArmor/build/push_kubearmor.sh stable |