Feature/add fncy logo #27
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
name: release | |
on: | |
create: | |
tags: | |
- v* | |
push: | |
branches: [ netmarble_v1.0, netmarble_v2.0 ] | |
pull_request: | |
branches: [ netmarble_v1.0, netmarble_v2.0 ] | |
env: | |
REGION: us-east-1 | |
ECR_REGISTRY_ID: 553885929720 | |
# Notice: must modify here to fit your service config path | |
GIT_SYNC_PATH: qa/gitops/qa-us/demo-app/values.yaml | |
TAG_FIELD: .image.tag | |
jobs: | |
CI: | |
runs-on: [self-hosted,prod-cicd-runners] | |
steps: | |
- uses: actions/checkout@v3 | |
# - uses: actions/setup-go@v3 | |
# with: | |
# go-version: 1.18 | |
# - name: golangci-lint | |
# uses: golangci/golangci-lint-action@v3 | |
# with: | |
# # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | |
# version: v1.45.2 | |
- name: Build, tag, and push image to Amazon ECR | |
run: | | |
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com | |
docker build -t ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com/${GITHUB_REPOSITORY#*/}:${GITHUB_SHA} . | |
docker push ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com/${GITHUB_REPOSITORY#*/}:${GITHUB_SHA} | |
docker build -t ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com/faucet:${GITHUB_SHA} -f Dockerfile.alltools . | |
docker push ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com/faucet:${GITHUB_SHA} | |
# CD: | |
# needs: [CI] | |
# runs-on: [self-hosted,qa-infra-k8s] | |
# steps: | |
# - name: clone the gitops config repo | |
# uses: actions/checkout@v3 | |
# with: | |
# repository: node-real/nodereal-app | |
# token: ${{ secrets.GO_MODULES_TOKEN }} | |
# - name: update image tag in gitops config repo | |
# env: | |
# GIT_SYNC_PATH: ${{ env.GIT_SYNC_PATH }} | |
# TAG_FIELD: ${{ env.TAG_FIELD }} | |
# run: | | |
# yq e "$TAG_FIELD = \"${GITHUB_REF#refs/*/}\"" -i $GIT_SYNC_PATH | |
# - name: Set PR branch name | |
# id: vars | |
# run: echo ::set-output name=branch-name::"github-action-patches/${GITHUB_SHA::7}" | |
# - name: Create Pull Request | |
# uses: peter-evans/create-pull-request@v4 | |
# with: | |
# token: ${{ secrets.GO_MODULES_TOKEN }} | |
# commit-message: update image tag | |
# title: github action CD auto-update | |
# labels: | | |
# lgtm | |
# body: TGIF | |
# branch: ${{ steps.vars.outputs.branch-name }} |