Skip to content

Upgrade Deno 1.41, Oak 14, ARM64 support #76

Upgrade Deno 1.41, Oak 14, ARM64 support

Upgrade Deno 1.41, Oak 14, ARM64 support #76

Workflow file for this run

name: Master CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Deno v1.41.0
uses: denoland/setup-deno@v1
with:
deno-version: v1.41.0
- name: Setup LCOV
run: sudo apt install -y lcov
- name: Verify formatting
run: deno task fmt
- name: Run linter
run: deno lint
- name: Run tests and coverage
run: deno task cover
- name: Fix LCOV output for SonarCloud
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/report.lcov
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
docker:
name: Publish Docker Image
needs: [ build-test ]
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/master'
outputs:
digest: ${{ steps.docker_build.outputs.digest }}
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
tags: trackerforce/switcher-management-feature:latest
update-kustomize:
name: Deploy
needs: [ docker ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'master'
- name: Checkout Kustomize
uses: actions/checkout@v4
with:
token: ${{ secrets.ARGOCD_PAT }}
repository: switcherapi/switcher-deployment
ref: master
- name: Set up arkade-get
uses: alexellis/arkade-get@master
with:
kubectl: latest
kustomize: latest
- name: Update GitOps repository
run: |
cd switcher-management-feature/base
echo RELEASE_TIME=`date` > environment-properties.env
kustomize edit set image trackerforce/switcher-management-feature:latest=trackerforce/switcher-management-feature@${{ needs.docker.outputs.digest }}
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git add .
git commit -m "[argocd] switcher-management-feature: ${{ needs.docker.outputs.digest }}"
git push