File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ *
2+ ! src
Original file line number Diff line number Diff line change 1+ ---
2+ # ##########################
3+ # ##########################
4+ # # Linter GitHub Actions ##
5+ # ##########################
6+ # ##########################
7+ name : Lint Code Base
8+
9+ #
10+ # Documentation:
11+ # https://help.github.com/en/articles/workflow-syntax-for-github-actions
12+ #
13+
14+ # ############################
15+ # Start the job on all push #
16+ # ############################
17+ on :
18+ push :
19+ branches-ignore :
20+ - ' master'
21+
22+ # ##############
23+ # Set the Job #
24+ # ##############
25+ jobs :
26+ build :
27+ # Name the Job
28+ name : Lint Code Base
29+ # Set the agent to run on
30+ runs-on : ubuntu-latest
31+
32+ # #################
33+ # Load all steps #
34+ # #################
35+ steps :
36+ # #########################
37+ # Checkout the code base #
38+ # #########################
39+ - name : Checkout Code
40+ uses : actions/checkout@v2
41+
42+ # ###############################
43+ # Run Linter against code base #
44+ # ###############################
45+ - name : Lint Code Base
46+ uses : docker://github/super-linter:v2.2.0
47+ env :
48+ VALIDATE_ALL_CODEBASE : false
49+ VALIDATE_ANSIBLE : false
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v2
14+ - uses : actions/setup-go@v3
15+ with :
16+ go-version : ' ^1.18.0'
17+ - name : Build
18+ run : cd src && CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -tags timetzdata -o ../aws-codeartifact-proxy
19+ - name : Github Release
20+ uses : softprops/action-gh-release@v1
21+ with :
22+ files : aws-codeartifact-proxy
23+ - name : Log in to Docker Hub
24+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
25+ with :
26+ username : ${{ secrets.DOCKER_USERNAME }}
27+ password : ${{ secrets.DOCKER_PASSWORD }}
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
31+ with :
32+ images : sktan/aws-codeartifact-proxy
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
35+ with :
36+ context : .
37+ push : true
38+ tags : ${{ steps.meta.outputs.tags }}
39+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments