diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index 07906a4c29..87ef82cc48 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -4,7 +4,7 @@ on: branches: - 'main' - paths: + paths: - 'STABLE-RELEASE' name: KubeArmor stable release @@ -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 \ No newline at end of file diff --git a/.github/workflows/stable-version-release.yml b/.github/workflows/stable-version-release.yml new file mode 100644 index 0000000000..6d6b751e41 --- /dev/null +++ b/.github/workflows/stable-version-release.yml @@ -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