Skip to content

Commit

Permalink
feat: pipeline change
Browse files Browse the repository at this point in the history
  • Loading branch information
jackstockley89 committed Mar 7, 2023
1 parent d080195 commit a7a6be5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/go-releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- "*"

env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
Assignee:
runs-on: ubuntu-latest
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
7 changes: 3 additions & 4 deletions .github/workflows/nightly-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
permissions:
contents: write

env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}

jobs:
check_date:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -97,5 +98,3 @@ jobs:
build-args: |
DIRECTORY=${{ matrix.name }}
COMMAND=${{ matrix.name }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
2 changes: 1 addition & 1 deletion assignee/assignee.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion auth-check/auth-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion close-pr/close-pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion version-check/version-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7a6be5

Please sign in to comment.