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