Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
silhouetteUA authored Dec 28, 2023
1 parent 66ec4ac commit 99e1eec
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
run: |
kubectl -n course create secret generic kbot-teletoken --from-literal TELE_TOKEN=$(gcloud secrets versions access latest --secret=${{ env.SECRET_NAME }}) --dry-run=client -o yaml > secret.yaml
- name: Encrypt file with sops
- name: Encrypt file with sops and deliver it to flux-sync repo
run: |
sops -e -gcp-kms projects/devops-course-prometheus/locations/global/keyRings/sops-flux/cryptoKeys/sops-keys-flux --encrypted-regex '^(TELE_TOKEN)$' secret.yaml > secret-encrypted.yaml
cat secret-encrypted.yaml
# cat secret-encrypted.yaml
cd flux-repo
mv ../secret-encrypted.yaml cluster/fluxcd-gke/resources
git config user.name github-actions
Expand All @@ -67,58 +67,58 @@ jobs:
git push origin main
# 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
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
- 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

0 comments on commit 99e1eec

Please sign in to comment.