Skip to content

Update main.yml

Update main.yml #23

Workflow file for this run

name: CI/CD for kbot
on:
push:
branches:
- develop
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
SECRET_NAME: KBOT_TELE_TOKEN
jobs:
secret:
name: kbot secret
runs-on: ubuntu-latest
steps:
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Access GCP Secret Manager Secret
run: |
SECRET_VALUE=$(gcloud secrets versions access latest --secret=${{ env.SECRET_NAME }})
echo "Secret Value: $SECRET_VALUE"
# ci:
# name: continious integration
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Set-Up_GOLANG
# uses: actions/setup-go@v4
# with:
# go-version: '1.21.3'
# - name: Test
# run: make test
# - name: Info
# run: make build-info
# - name: Log in to the Container registry
# uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build Image
# run: make image
# - name: Push Image to ghcr.io
# run: make push
# cd:
# name: CD
# needs: ci
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - run: echo "VERSION=$(git describe --tags --abbrev=0)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# - uses: mikefarah/yq@master
# with:
# cmd: yq -i '.image.tag=strenv(VERSION)' helm/values.yaml
# - run: |
# git config user.name github-actions
# git config user.email [email protected]
# git commit -am "update version $VERSION"
# git push