Skip to content

Commit

Permalink
Merge pull request kubearmor#628 from Ankurk99/branchstable
Browse files Browse the repository at this point in the history
update stable tag to point to the latest version release branch
  • Loading branch information
nyrahul authored Feb 19, 2022
2 parents 975ab49 + babf216 commit 7b0baa4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- 'main'

paths:
paths:
- 'STABLE-RELEASE'

name: KubeArmor stable release
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/stable-version-release.yml
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

0 comments on commit 7b0baa4

Please sign in to comment.