-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66ec4ac
commit 99e1eec
Showing
1 changed file
with
56 additions
and
56 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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |