From 0ecb967ca9157fd3b37a721a7f8c0df1cd2b0a87 Mon Sep 17 00:00:00 2001
From: Peter Balogh
Date: Thu, 17 Mar 2022 15:20:32 +0100
Subject: [PATCH] build: fix actions (#148)
Signed-off-by: Peter Balogh
---
.github/workflows/image-build.yaml | 33 ------------------------------
.github/workflows/release.yml | 29 +++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 34 deletions(-)
delete mode 100644 .github/workflows/image-build.yaml
diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml
deleted file mode 100644
index 90dda1c..0000000
--- a/.github/workflows/image-build.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Trigger PKE image build
-on:
- push:
- tags:
- - "[0-9]+.[0-9]+.[0-9]+"
-
-jobs:
- trigger-image-build:
- runs-on: ubuntu-latest
- needs: release
-
- steps:
- - name: Check out code
- uses: actions/checkout@v2
-
- - name: Set ref
- id: set-ref
- run: ::set-output name=tag::${GITHUB_REF#refs/*/}
-
- - name: Trigger pke-image build
- uses: actions/github-script@v6
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- await github.rest.actions.createWorkflowDispatch({
- owner: 'banzaicloud',
- repo: 'pke-image',
- workflow_id: 'packer-build.yml',
- ref: 'master',
- inputs: {
- tag: '${{ steps.set-ref.outputs.tag }}'
- }
- })
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9cb91ca..336a10e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -2,7 +2,7 @@ name: Release PKE
on:
push:
tags:
- - "*"
+ - "[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
@@ -28,3 +28,30 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ trigger-image-build:
+ runs-on: ubuntu-latest
+ needs: release
+
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+
+ - name: Set ref
+ id: set-ref
+ run: ::set-output name=tag::${GITHUB_REF#refs/*/}
+
+ - name: Trigger pke-image build
+ uses: actions/github-script@v6
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ await github.rest.actions.createWorkflowDispatch({
+ owner: 'banzaicloud',
+ repo: 'pke-image',
+ workflow_id: 'packer-build.yml',
+ ref: 'master',
+ inputs: {
+ tag: '${{ steps.set-ref.outputs.tag }}'
+ }
+ })
\ No newline at end of file