Skip to content

Commit

Permalink
build: fix actions (#148)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Balogh <[email protected]>
  • Loading branch information
pbalogh-sa authored Mar 17, 2022
1 parent 708d564 commit 0ecb967
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 34 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/image-build.yaml

This file was deleted.

29 changes: 28 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release PKE
on:
push:
tags:
- "*"
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
release:
Expand All @@ -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 }}'
}
})

0 comments on commit 0ecb967

Please sign in to comment.