forked from Checkmarx/kics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nightly release and remove pre release workflow (Checkmarx#1843)
* add nightly release and remove pre release * add commit sha to nightly release name * remove unused file
- Loading branch information
Showing
3 changed files
with
118 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: goreleaser scheduled | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist --config="./.goreleaser-nightly.yml" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: delete release | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true # default: false | ||
tag_name: nightly # tag name to delete | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: nightly | ||
release_name: nightly-${{ github.sha }} | ||
draft: false | ||
prerelease: true | ||
- name: dislay assets | ||
run: | | ||
ls -l /home/runner/work/kics/kics/dist | ||
- name: Upload Release Asset linux | ||
id: upload-release-asset-linux | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: /home/runner/work/kics/kics/dist/kics_nightly_linux_x64.tar.gz | ||
asset_name: test_nightly-release_linux_amd64.tar.gz | ||
asset_content_type: application/gzip | ||
- name: Upload Release Asset windows | ||
id: upload-release-asset-windows | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: /home/runner/work/kics/kics/dist/kics_nightly_windows_x64.zip | ||
asset_name: test_nightly-release_windows_amd64.zip | ||
asset_content_type: application/zip | ||
- name: Upload Release Asset checksum | ||
id: upload-release-asset-checksums | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: /home/runner/work/kics/kics/dist/kics_nightly_checksums.txt | ||
asset_name: test_nightly-release_checksums.txt | ||
asset_content_type: text/plain | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Push to Docker Hub | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: checkmarx/kics | ||
tag_with_ref: false | ||
tags: nightly |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
project_name: kics | ||
|
||
builds: | ||
- main: ./cmd/console/main.go | ||
binary: kics | ||
goos: | ||
- linux | ||
- windows | ||
goarch: | ||
- amd64 | ||
archives: | ||
- | ||
builds: [kics] | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
replacements: | ||
amd64: x64 | ||
386: x32 | ||
files: | ||
- assets/queries | ||
release: | ||
prerelease: true | ||
snapshot: | ||
name_template: "nightly" |