Skip to content

Commit

Permalink
update stable tag when the latest version release branch is updated
Browse files Browse the repository at this point in the history
Signed-off-by: Ankur Kothiwal <[email protected]>
  • Loading branch information
Ankurk99 committed Feb 17, 2022
1 parent 975ab49 commit 1237c90
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .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 Expand Up @@ -32,4 +32,4 @@ jobs:
password: ${{ secrets.DOCKER_AUTHTOK }}

- name: Push KubeArmor images to Docker
run: ./KubeArmor/build/push_kubearmor.sh stable
run: ./KubeArmor/build/push_kubearmor.sh stable
34 changes: 34 additions & 0 deletions .github/workflows/stable-version-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
# Sequence of patterns matched against refs/tags
branches:
- 'v*'

name: KubeArmor stable release

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
run: |
value=`cat STABLE-RELEASE`
docker pull docker.io/kubearmor/kubearmor:$value
docker image tag kubearmor/kubearmor:$value kubearmor/kubearmor:stable
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_AUTHTOK }}

- name: Push KubeArmor images to Docker
run: ./KubeArmor/build/push_kubearmor.sh stable

0 comments on commit 1237c90

Please sign in to comment.