ci: remove hub dispatch, (msi) take release version from git history (#1949)
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
This commit is contained in:
parent
51800132cd
commit
2142f7bb5c
37
.github/workflows/ci-windows-build-msi.yml
vendored
37
.github/workflows/ci-windows-build-msi.yml
vendored
|
@ -1,29 +1,26 @@
|
||||||
name: build-msi (windows)
|
name: build-msi (windows)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- prereleased
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- releases/**
|
||||||
|
paths:
|
||||||
|
- windows/installer/*.wxs
|
||||||
|
- .github/workflows/ci-windows-build-msi.yml
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- releases/**
|
- releases/**
|
||||||
paths-ignore:
|
paths:
|
||||||
- 'docs/**'
|
- windows/installer/*.wxs
|
||||||
- 'mkdocs.yml'
|
- .github/workflows/ci-windows-build-msi.yml
|
||||||
- 'README.md'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get_latest_release:
|
|
||||||
name: get_latest_release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- id: get_latest_release
|
|
||||||
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
latest: true
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
@ -34,9 +31,9 @@ jobs:
|
||||||
go-version: 1.19
|
go-version: 1.19
|
||||||
id: go
|
id: go
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- id: set_release_in_env
|
with:
|
||||||
run: echo "BUILD_VERSION=${{ jobs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV
|
fetch-depth: 0
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make windows_installer
|
run: make windows_installer
|
||||||
- name: Upload MSI
|
- name: Upload MSI
|
||||||
|
|
22
.github/workflows/dispatch_ci_hub.yaml
vendored
22
.github/workflows/dispatch_ci_hub.yaml
vendored
|
@ -1,22 +0,0 @@
|
||||||
name: Dispatch to hub when creating pre-release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# branches to consider in the event; optional, defaults to all
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- releases/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dispatch:
|
|
||||||
name: dispatch to hub-tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Repository Dispatch
|
|
||||||
uses: peter-evans/repository-dispatch@v1
|
|
||||||
if: ${{ github.repository_owner == 'crowdsecurity' }}
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
|
||||||
event-type: trigger_ci_hub
|
|
||||||
repository: crowdsecurity/hub
|
|
||||||
client-payload: '{"version": "${{ steps.keydb.outputs.release }}"}'
|
|
|
@ -1,34 +0,0 @@
|
||||||
name: Dispatch to hub when creating pre-release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- prereleased
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get_latest_release:
|
|
||||||
name: get_latest_release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- id: get_latest_release
|
|
||||||
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
latest: true
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
|
|
||||||
dispatch:
|
|
||||||
name: dispatch to hub-tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Repository Dispatch
|
|
||||||
uses: peter-evans/repository-dispatch@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
|
||||||
event-type: create_branch
|
|
||||||
repository: crowdsecurity/hub
|
|
||||||
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
|
|
|
@ -1,34 +0,0 @@
|
||||||
name: Dispatch to hub when deleting pre-release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- deleted
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get_latest_release:
|
|
||||||
name: get_latest_release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- id: get_latest_release
|
|
||||||
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
latest: true
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
|
|
||||||
dispatch:
|
|
||||||
name: dispatch to hub-tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Repository Dispatch
|
|
||||||
uses: peter-evans/repository-dispatch@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
|
||||||
event-type: delete_branch
|
|
||||||
repository: crowdsecurity/hub
|
|
||||||
client-payload: '{"version": "${{ jobs.get_latest_release.outputs.tag_name }}"}'
|
|
|
@ -18,6 +18,8 @@ jobs:
|
||||||
id: go
|
id: go
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Build the binaries
|
- name: Build the binaries
|
||||||
run: make release
|
run: make release
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
|
@ -37,6 +39,8 @@ jobs:
|
||||||
id: go
|
id: go
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Build the binaries
|
- name: Build the binaries
|
||||||
run: |
|
run: |
|
||||||
make release BUILD_STATIC=yes
|
make release BUILD_STATIC=yes
|
||||||
|
|
|
@ -168,7 +168,6 @@
|
||||||
<ComponentRef Id="NotifConfig" />
|
<ComponentRef Id="NotifConfig" />
|
||||||
<ComponentRef Id="CreateCrowdsecPluginsDir"/>
|
<ComponentRef Id="CreateCrowdsecPluginsDir"/>
|
||||||
<ComponentRef Id="CreateCrowdsecDataDir" />
|
<ComponentRef Id="CreateCrowdsecDataDir" />
|
||||||
<ComponentRef Id="ConsoleDir"/>
|
|
||||||
<ComponentRef Id="ConsoleContextFile"/>
|
<ComponentRef Id="ConsoleContextFile"/>
|
||||||
<ComponentRef Id="Csconfig_lapi" />
|
<ComponentRef Id="Csconfig_lapi" />
|
||||||
<ComponentRef Id="Csconfig_no_lapi" />
|
<ComponentRef Id="Csconfig_no_lapi" />
|
||||||
|
|
Loading…
Reference in a new issue