ci: remove hub dispatch, always full history when building, build version from git (#1942)
This commit is contained in:
parent
80e6a2e60b
commit
6ef4217643
22
.github/workflows/ci-windows-build-msi.yml
vendored
22
.github/workflows/ci-windows-build-msi.yml
vendored
|
@ -6,25 +6,9 @@ on:
|
||||||
- prereleased
|
- prereleased
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get_latest_release:
|
|
||||||
name: get_latest_release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
outputs:
|
|
||||||
tag_name: ${{ steps.get_latest_release.tag_name }}
|
|
||||||
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
|
||||||
needs: get_latest_release
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.19
|
- name: Set up Go 1.19
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
|
@ -32,9 +16,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=${{ needs.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,37 +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
|
|
||||||
outputs:
|
|
||||||
tag_name: ${{ steps.get_latest_release.tag_name }}
|
|
||||||
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
|
|
||||||
needs: get_latest_release
|
|
||||||
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": "${{ needs.get_latest_release.outputs.tag_name }}"}'
|
|
|
@ -1,37 +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
|
|
||||||
outputs:
|
|
||||||
tag_name: ${{ steps.get_latest_release.tag_name }}
|
|
||||||
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
|
|
||||||
needs: get_latest_release
|
|
||||||
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": "${{ needs.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
|
||||||
|
|
Loading…
Reference in a new issue