Skip to content

Update codercom/code-server Docker tag to v4.96.2 #677

Update codercom/code-server Docker tag to v4.96.2

Update codercom/code-server Docker tag to v4.96.2 #677

Workflow file for this run

name: Build Training
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
submodules: recursive
-
name: Set up npm for linting
uses: actions/setup-node@v4
with:
node-version: '18.x'
-
name: Lint Markdown
run: npm ci && npm run mdlint
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Quay.io Container Registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
-
name: Build Latest Version
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
quay.io/puzzle/amm-techlab:pr-${{ github.event.pull_request.number }}
-
name: Run vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'quay.io/puzzle/amm-techlab:pr-${{ github.event.pull_request.number }}'
format: 'table'
output: 'trivy-results.txt'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os'
severity: 'CRITICAL,HIGH'
-
name: Archive vulnerability scan results
uses: actions/upload-artifact@v4
with:
name: trivy-results-build
path: trivy-results.txt
-
name: 'Install Helm'
uses: azure/setup-helm@v4
with:
version: v3.6.2
-
name: Install Kubectl
uses: azure/setup-kubectl@v4
with:
version: v1.21.2
-
name: Create KUBECONFIG
env:
KUBE_CONFIG: '${{ secrets.KUBECONFIG_TEST_AV2 }}'
run: |
mkdir -p $HOME/.kube
echo "$KUBE_CONFIG" > $HOME/.kube/config
-
name: Deploy Helm Release
env:
TRAINING_HELM_RELEASE: 'pr-${{ github.event.pull_request.number }}'
TRAINING_NAMESPACE: 'pitc-cicd-amm-techlab-test'
TRAINING_VERSION: '${{ github.sha }}'
run: |
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait \
--kubeconfig $HOME/.kube/config \
--namespace=$TRAINING_NAMESPACE \
--set=app.name=$HELM_RELEASE \
--set=app.version=$TRAINING_VERSION \
--repo=https://acend.github.io/helm-charts/ \
--values=helm-chart/values.yaml \
--atomic
-
name: Redeploy Deployments
env:
TRAINING_HELM_RELEASE: 'pr-${{ github.event.pull_request.number }}'
TRAINING_HELM_NAME: 'amm-techlab-puzzle'
TRAINING_NAMESPACE: 'pitc-cicd-amm-techlab-test'
run: |
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME} \
--kubeconfig $HOME/.kube/config \
--namespace $TRAINING_NAMESPACE
-
name: Comment PR Environments in PR
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
PR Environments:
* puzzle <https://amm-techlab-pr-${{ github.event.pull_request.number }}.ocp.cloudscale.puzzle.ch>