From 035004d891258694eaa274744c667950cc743a2b Mon Sep 17 00:00:00 2001 From: Sandeep Singh Date: Tue, 22 Nov 2022 11:58:50 +0530 Subject: [PATCH] Misc update (#120) * version update * workflow update --- .github/workflows/build-test.yml | 1 - .github/workflows/codeql-analysis.yml | 4 +--- .github/workflows/dockerhub-push.yml | 4 ++-- .github/workflows/lint-test.yml | 2 +- .github/workflows/release-binary.yml | 7 +++++-- .goreleaser.yml | 7 +++++++ internal/runner/banner.go | 4 ++-- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index ddfe8e7..421c5c3 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,7 +1,6 @@ name: 🔨 Build Test on: - push: pull_request: workflow_dispatch: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9f533f8..16a8cfb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,10 +1,8 @@ name: 🚨 CodeQL Analysis on: - workflow_dispatch: pull_request: - branches: - - dev + workflow_dispatch: jobs: analyze: diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 2f9d972..64ddb9e 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -17,7 +17,7 @@ jobs: - name: Get Github tag id: meta run: | - echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/projectdiscovery/chaos-client/releases/latest" | jq -r .tag_name)" + curl --silent "https://api.github.com/repos/projectdiscovery/chaos-client/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -37,4 +37,4 @@ jobs: context: . platforms: linux/amd64,linux/arm64,linux/arm push: true - tags: projectdiscovery/chaos-client:latest,projectdiscovery/chaos-client:${{ steps.meta.outputs.tag }} \ No newline at end of file + tags: projectdiscovery/chaos-client:latest,projectdiscovery/chaos-client:${{ steps.meta.outputs.TAG }} \ No newline at end of file diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 9d45d98..433fb3d 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -1,6 +1,6 @@ name: 🙏🏻 Lint Test + on: - push: pull_request: workflow_dispatch: diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 2975180..42f4de0 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -2,6 +2,8 @@ name: 🎉 Release Binary on: create: + tags: + - v* workflow_dispatch: jobs: @@ -21,5 +23,6 @@ jobs: args: "release --rm-dist" version: latest workdir: . - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + SLACK_WEBHOOK: "${{ secrets.RELEASE_SLACK_WEBHOOK }}" \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 1030715..3dc2fea 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -33,3 +33,10 @@ archives: checksum: algorithm: sha256 + +announce: + slack: + enabled: true + channel: '#release' + username: GoReleaser + message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' \ No newline at end of file diff --git a/internal/runner/banner.go b/internal/runner/banner.go index d927b2d..b1cffe8 100644 --- a/internal/runner/banner.go +++ b/internal/runner/banner.go @@ -7,11 +7,11 @@ const banner = ` _____/ /_ ____ _____ _____ / ___/ __ \/ __ / __ \/ ___/ / /__/ / / / /_/ / /_/ (__ ) -\___/_/ /_/\__,_/\____/____/ v0.3.0 +\___/_/ /_/\__,_/\____/____/ v0.4.0 ` // Version is the current version of chaos -const Version = `0.3.0` +const Version = `0.4.0` // showBanner is used to show the banner to the user func showBanner() {