diff --git a/.github/workflows/ci-windows-build-msi.yml b/.github/workflows/ci-windows-build-msi.yml index 0bdf3645d..0e9056d0c 100644 --- a/.github/workflows/ci-windows-build-msi.yml +++ b/.github/workflows/ci-windows-build-msi.yml @@ -1,14 +1,9 @@ name: build-msi (windows) on: - pull_request: - branches: - - master - - releases/** - paths-ignore: - - 'docs/**' - - 'mkdocs.yml' - - 'README.md' + release: + types: + - prereleased jobs: get_latest_release: @@ -29,6 +24,7 @@ jobs: build: name: Build runs-on: windows-2019 + needs: get_latest_release steps: - name: Set up Go 1.19 uses: actions/setup-go@v3 @@ -38,7 +34,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - id: set_release_in_env - run: echo "BUILD_VERSION=${{ jobs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV + run: echo "BUILD_VERSION=${{ needs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV - name: Build run: make windows_installer - name: Upload MSI diff --git a/.github/workflows/dispatch_create_branch_hub.yaml b/.github/workflows/dispatch_create_branch_hub.yaml index e3f5acf20..914bc06c5 100644 --- a/.github/workflows/dispatch_create_branch_hub.yaml +++ b/.github/workflows/dispatch_create_branch_hub.yaml @@ -26,6 +26,7 @@ jobs: dispatch: name: dispatch to hub-tests runs-on: ubuntu-latest + needs: get_latest_release steps: - name: Repository Dispatch uses: peter-evans/repository-dispatch@v1 @@ -33,4 +34,4 @@ jobs: token: ${{ secrets.DISPATCH_TOKEN }} event-type: create_branch repository: crowdsecurity/hub - client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}' + client-payload: '{"version": "${{ needs.get_latest_release.outputs.tag_name }}"}' diff --git a/.github/workflows/dispatch_delete_branch_hub.yaml b/.github/workflows/dispatch_delete_branch_hub.yaml index 64f1ceda3..2a080fa27 100644 --- a/.github/workflows/dispatch_delete_branch_hub.yaml +++ b/.github/workflows/dispatch_delete_branch_hub.yaml @@ -26,6 +26,7 @@ jobs: dispatch: name: dispatch to hub-tests runs-on: ubuntu-latest + needs: get_latest_release steps: - name: Repository Dispatch uses: peter-evans/repository-dispatch@v1 @@ -33,4 +34,4 @@ jobs: token: ${{ secrets.DISPATCH_TOKEN }} event-type: delete_branch repository: crowdsecurity/hub - client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}' + client-payload: '{"version": "${{ needs.get_latest_release.outputs.tag_name }}"}'