Skip to content

Commit

Permalink
CI/CD - Updated GitHub Access Token Configuration (#3880)
Browse files Browse the repository at this point in the history
  • Loading branch information
dealako authored Mar 27, 2023
1 parent b9b4160 commit 40d3b80
Show file tree
Hide file tree
Showing 14 changed files with 245 additions and 566 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB}}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB}}
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER }}

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB}}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB}}
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER }}

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ jobs:
- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB}}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB}}
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER }}

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ jobs:
- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB}}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB}}
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER }}

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y
Expand Down
3 changes: 2 additions & 1 deletion cla-backend-go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ FUNCTIONAL_TESTS_BIN = functional-tests
USER_SUBSCRIBE_BIN = user-subscribe-lambda
REPOSITORY_UPDATE_BIN = repository-update-tool
MAKEFILE_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
GOPRIVATE=github.com/LF-Engineering/*
BUILD_TIME=$(shell sh -c 'date -u +%FT%T%z')
VERSION := $(shell sh -c 'git describe --always --tags')
BRANCH := $(shell sh -c 'git rev-parse --abbrev-ref HEAD')
Expand Down Expand Up @@ -229,7 +230,7 @@ mock:


deps:
@go env -w GOPRIVATE=github.com/LF-Engineering/*
@go env -w GOPRIVATE=$(GOPRIVATE)
@go mod download -x

build-prep:
Expand Down
2 changes: 1 addition & 1 deletion cla-backend-go/auth/auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"path"

log "github.com/communitybridge/easycla/cla-backend-go/logging"
"github.com/dgrijalva/jwt-go"
"github.com/golang-jwt/jwt/v4"
)

// Validator data model
Expand Down
2 changes: 1 addition & 1 deletion cla-backend-go/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"net/http"
"time"

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/shurcooL/githubv4"

"github.com/bradleyfalzon/ghinstallation"
"github.com/google/go-github/v37/github"
"golang.org/x/oauth2"
)
Expand Down
33 changes: 19 additions & 14 deletions cla-backend-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
// SPDX-License-Identifier: MIT
module github.com/communitybridge/easycla/cla-backend-go

go 1.18
go 1.20

replace github.com/awslabs/aws-lambda-go-api-proxy => github.com/LF-Engineering/aws-lambda-go-api-proxy v0.3.2

require (
github.com/LF-Engineering/aws-lambda-go-api-proxy v0.3.2
github.com/LF-Engineering/lfx-kit v0.1.32
github.com/LF-Engineering/lfx-kit v0.1.33
github.com/LF-Engineering/lfx-models v0.7.9
github.com/aws/aws-lambda-go v1.22.0
github.com/aws/aws-sdk-go v1.36.27
github.com/aymerick/raymond v2.0.2+incompatible
github.com/bitly/go-simplejson v0.5.0 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
github.com/bradleyfalzon/ghinstallation v1.1.1
github.com/davecgh/go-spew v1.1.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fnproject/fdk-go v0.0.2
github.com/gin-gonic/gin v1.7.2
github.com/gin-gonic/gin v1.7.7
github.com/go-openapi/errors v0.20.2
github.com/go-openapi/loads v0.21.0
github.com/go-openapi/runtime v0.21.1
Expand Down Expand Up @@ -59,18 +58,21 @@ require (
github.com/verdverm/frisby v0.0.0-20170604211311-b16556248a9a
github.com/xanzy/go-gitlab v0.50.1
go.uber.org/ratelimit v0.1.0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
golang.org/x/net v0.8.0
golang.org/x/oauth2 v0.6.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.6.0 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)

require (
github.com/ProtonMail/go-crypto v0.0.0-20230321155629-9a39f2531310 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.2 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
Expand All @@ -79,9 +81,12 @@ require (
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0-rc.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-github/v29 v29.0.2 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/go-github/v50 v50.2.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
Expand All @@ -101,14 +106,14 @@ require (
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
go.mongodb.org/mongo-driver v1.10.1 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 40d3b80

Please sign in to comment.