diff --git a/.github/workflows/go-releaser.yaml b/.github/workflows/go-releaser.yaml index 8eaaaa2..db68367 100644 --- a/.github/workflows/go-releaser.yaml +++ b/.github/workflows/go-releaser.yaml @@ -5,6 +5,10 @@ on: tags: - "*" +env: + GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + jobs: Assignee: runs-on: ubuntu-latest @@ -31,9 +35,6 @@ jobs: with: version: latest args: release -f assignee/.goreleaser.yaml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} Auth-Check: runs-on: ubuntu-latest @@ -60,9 +61,6 @@ jobs: with: version: latest args: release -f auth-check/.goreleaser.yaml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} Close-PR: runs-on: ubuntu-latest @@ -89,9 +87,6 @@ jobs: with: version: latest args: release -f close-pr/.goreleaser.yaml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} Version-Check: runs-on: ubuntu-latest @@ -118,6 +113,3 @@ jobs: with: version: latest args: release -f version-check/.goreleaser.yaml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/nightly-build.yaml b/.github/workflows/nightly-build.yaml index c6313de..a8ff0c0 100644 --- a/.github/workflows/nightly-build.yaml +++ b/.github/workflows/nightly-build.yaml @@ -8,6 +8,9 @@ on: permissions: contents: write +env: + GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} + jobs: check_date: runs-on: ubuntu-latest @@ -36,8 +39,6 @@ jobs: - id: version_check name: Version check uses: docker://jackstock8904/version-check:latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} docker: needs: [check_date, version] @@ -97,5 +98,3 @@ jobs: build-args: | DIRECTORY=${{ matrix.name }} COMMAND=${{ matrix.name }} - env: - GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} diff --git a/assignee/assignee.go b/assignee/assignee.go index 347d2dd..5d9b7c5 100644 --- a/assignee/assignee.go +++ b/assignee/assignee.go @@ -15,7 +15,7 @@ import ( ) var ( - token = flag.String("token", os.Getenv("REPO_TOKEN"), "GihHub Personel token string") + token = flag.String("token", os.Getenv("GITHUB_TOKEN"), "GihHub Personel token string") githubrepo = flag.String("githubrepo", os.Getenv("GITHUB_REPOSITORY"), "Github Repository string") githubref = flag.String("githubref", os.Getenv("GITHUB_REF"), "Github Respository PR ref string") c = client.ClientConnect(*token) diff --git a/auth-check/auth-check.go b/auth-check/auth-check.go index 366373b..efe7571 100644 --- a/auth-check/auth-check.go +++ b/auth-check/auth-check.go @@ -17,7 +17,7 @@ import ( func PullRequestCheck() (bool, error) { flag.Parse() - token := flag.String("token", os.Getenv("REPO_TOKEN"), "GihHub Personel token string") + token := flag.String("token", os.Getenv("GITHUB_TOKEN"), "GihHub Personel token string") githubrepo := flag.String("githubrepo", os.Getenv("GITHUB_REPOSITORY"), "Github Repository string") githubref := flag.String("githubref", os.Getenv("GITHUB_REF"), "Github Respository PR ref string") c := client.ClientConnect(*token) diff --git a/close-pr/close-pr.go b/close-pr/close-pr.go index ff127da..8cb2254 100644 --- a/close-pr/close-pr.go +++ b/close-pr/close-pr.go @@ -15,7 +15,7 @@ import ( func PullRequestClose() { flag.Parse() - token := flag.String("token", os.Getenv("REPO_TOKEN"), "GihHub Personel token string") + token := flag.String("token", os.Getenv("GITHUB_TOKEN"), "GihHub Personel token string") githubrepo := flag.String("githubrepo", os.Getenv("GITHUB_REPOSITORY"), "Github Repository string") githubref := flag.String("githubref", os.Getenv("GITHUB_REF"), "Github Respository PR ref string") c := client.ClientConnect(*token) diff --git a/version-check/version-check.go b/version-check/version-check.go index 9277386..a7cc531 100644 --- a/version-check/version-check.go +++ b/version-check/version-check.go @@ -15,7 +15,7 @@ import ( ) var ( - token = flag.String("token", os.Getenv("REPO_TOKEN"), "GihHub Personel token string") + token = flag.String("token", os.Getenv("GITHUB_TOKEN"), "GihHub Personel token string") githubrepo = flag.String("githubrepo", os.Getenv("GITHUB_REPOSITORY"), "Github Repository string") githubref = flag.String("githubref", os.Getenv("GITHUB_REF"), "Github Reference string") output string