-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into refactor-join-my-room
- Loading branch information
Showing
234 changed files
with
22,777 additions
and
34,477 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
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
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,86 @@ | ||
name: Push/Deploy | ||
|
||
on: push | ||
|
||
jobs: | ||
build-and-push-images: | ||
strategy: | ||
matrix: | ||
folder: [authentik, admin, backend, frontend, presenter] | ||
runs-on: ubuntu-latest | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }}/${{ matrix.folder }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@60a0d343a0d8a18aedee9d34e62251f752153bdb | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=schedule | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=sha | ||
- name: Build and push Docker images | ||
id: push | ||
uses: docker/build-push-action@a8d35412fb758de9162fd63e3fa3f0942bdedb4d | ||
with: | ||
context: ${{ matrix.folder }} | ||
target: production | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
# This will clutter our packages. I think it's fine to leave that out: | ||
# https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds | ||
# | ||
# - name: Generate artifact attestation | ||
# uses: actions/attest-build-provenance@210c1913531870065f03ce1f9440dd87bc0938cd # v1.4.0 | ||
# with: | ||
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | ||
# subject-digest: ${{ steps.push.outputs.digest }} | ||
# push-to-registry: true | ||
|
||
deploy-to-kubernetes: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
needs: build-and-push-images | ||
steps: | ||
- uses: mdgreenwald/mozilla-sops-action@d9714e521cbaecdae64a89d2fdd576dd2aa97056 # v1.6.0 | ||
- uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 | ||
- run: | | ||
mkdir -p ~/.config/sops/age | ||
echo $SOPS_KEY | base64 --decode > ~/.config/sops/age/keys.txt | ||
env: | ||
SOPS_KEY: ${{ secrets.SOPS_KEY }} | ||
- run: | | ||
mkdir -p ~/.kube | ||
sops decrypt ./infrastructure/helmfile/secrets/kubeconfig > ~/.kube/config | ||
- run: echo "IMAGE_TAG=sha-$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV | ||
- uses: helmfile/helmfile-action@314e6f498c8fb72ae64ed6f526e992a6a9a90e32 #v1.9.1 | ||
with: | ||
helmfile-args: apply --environment master | ||
helmfile-workdirectory: ./infrastructure/helmfile | ||
helm-plugins: > | ||
https://github.com/databus23/helm-diff, | ||
https://github.com/jkroepke/helm-secrets | ||
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
Oops, something went wrong.