-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from kahootali/update-pipelines
update pipelines and info
- Loading branch information
Showing
8 changed files
with
60 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,24 +16,23 @@ jobs: | |
run: | ||
shell: bash | ||
steps: | ||
- name: Set up Go 1.13 | ||
uses: actions/setup-go@v1 | ||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.13 | ||
go-version: '1.20' | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Code | ||
run: | | ||
go get github.com/thedevsaddam/renderer/... | ||
go mod download | ||
go build -v . | ||
- name: Generate Version | ||
id: generate_version | ||
uses: anothrNick/github-tag-action@1.52.0 | ||
uses: anothrNick/github-tag-action@1.67.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
|
@@ -56,9 +55,9 @@ jobs: | |
echo IMAGE=$(echo "$REGISTRY/$IMAGE_ID") >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -79,17 +78,24 @@ jobs: | |
file: ./Dockerfile | ||
pull: true | ||
push: true | ||
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} | ||
cache-to: type=inline | ||
tags: ${{ env.IMAGE }} | ||
|
||
- name: Push tag | ||
uses: anothrNick/[email protected] | ||
uses: anothrNick/[email protected] | ||
id: tag_version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: "patch" | ||
|
||
- name: Create a GitHub release | ||
id: 'github_release' | ||
uses: ncipollo/[email protected] | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: ${{ steps.tag_version.outputs.new_tag }} | ||
generateReleaseNotes: true | ||
|
||
# - name: Deploy | ||
# uses: steebchen/[email protected] | ||
# with: | ||
|
@@ -104,4 +110,4 @@ jobs: | |
fields: repo,author,action,eventName,ref,workflow | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,6 @@ name: CI | |
on: | ||
pull_request: | ||
|
||
env: | ||
IMAGE_NAME: golang-sample-app | ||
|
||
jobs: | ||
Build-and-Push-Image: | ||
runs-on: ubuntu-latest | ||
|
@@ -17,27 +14,28 @@ jobs: | |
run: | ||
shell: bash | ||
steps: | ||
- name: Set up Go 1.13 | ||
uses: actions/setup-go@v1 | ||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.13 | ||
go-version: '1.20' | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Code | ||
run: | | ||
go get github.com/thedevsaddam/renderer/... | ||
go mod download | ||
go build -v . | ||
- name: Initialize Pipeline | ||
uses: mshick/add-pr-comment@v1 | ||
uses: mshick/add-pr-comment@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
message: "@${{ github.actor }} GitHub Actions has started building this code. Check status at 'https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks'" | ||
allow-repeats: false | ||
message: "@${{ github.actor }} GitHub Actions has started building this code. Check status at 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'" | ||
message-id: ${{ github.run_id }}-${{ github.run_attempt }} | ||
|
||
- name: Generate Vars | ||
id: generate_vars | ||
run: | | ||
|
@@ -54,11 +52,10 @@ jobs: | |
echo REPO=$IMAGE_NAME >> $GITHUB_ENV | ||
echo IMAGE=$(echo "$REGISTRY/$IMAGE_ID") >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -79,8 +76,6 @@ jobs: | |
file: ./Dockerfile | ||
pull: true | ||
push: true | ||
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} | ||
cache-to: type=inline | ||
tags: ${{ env.IMAGE }} | ||
|
||
- name: Comment on PR | ||
|
@@ -99,11 +94,6 @@ jobs: | |
with: | ||
message: '@${{ github.actor }} The pipeline failed! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!' | ||
allow-repeats: false | ||
# - name: Deploy | ||
# uses: steebchen/[email protected] | ||
# with: | ||
# config: ${{ secrets.KUBE_CONFIG }} | ||
# command: set image -n dev deployment/golang-deployment golang=${{ env.IMAGE }} | ||
|
||
- name: Notify Slack | ||
uses: 8398a7/action-slack@v3 | ||
|
@@ -114,5 +104,3 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module github.com/kahootali/golang-sample-app | ||
|
||
go 1.20 | ||
|
||
require ( | ||
github.com/thedevsaddam/renderer v1.2.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
github.com/thedevsaddam/renderer v1.2.0 h1:+N0J8t/s2uU2RxX2sZqq5NbaQhjwBjfovMU28ifX2F4= | ||
github.com/thedevsaddam/renderer v1.2.0/go.mod h1:k/TdZXGcpCpHE/KNj//P2COcmYEfL8OV+IXDX0dvG+U= | ||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters