Skip to content

fix chart publishing (#2916) #19686

fix chart publishing (#2916)

fix chart publishing (#2916) #19686

Workflow file for this run

name: CI / Console
env:
DOCKER_METADATA_PR_HEAD_SHA: 'true'
on:
push:
branches: [master]
pull_request:
branches: ["*"]
jobs:
build:
name: Test Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/pluralsh/console
docker.io/pluralsh/console
# generate Docker tags based on the following events/attributes
tags: |
type=sha
type=ref,event=pr
type=ref,event=branch
- name: Docker meta
id: meta-ubuntu
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/pluralsh/console-ubuntu
# generate Docker tags based on the following events/attributes
tags: |
type=sha
type=ref,event=pr
type=ref,event=branch
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker
uses: docker/login-action@v3
with:
username: mjgpluralsh
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
# - name: download jwt verification key
# run: |
# echo $JWT_PUBLIC_KEY > config/pubkey.pem
# env:
# JWT_PUBLIC_KEY: ${{ secrets.JWT_PUBLIC_KEY }}
- name: Test Build console image
uses: docker/build-push-action@v3
with:
context: "."
file: "./Dockerfile"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=registry,ref=ghcr.io/pluralsh/console:buildcache
cache-to: type=registry,ref=ghcr.io/pluralsh/console-cache:buildcache,mode=max
build-args: |
GIT_COMMIT=${{ github.sha }}
VITE_PROD_SECRET_KEY=${{ secrets.VITE_PROD_SECRET_KEY }}
VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
# - name: Build and push ubuntu images
# uses: docker/build-push-action@v3
# with:
# context: "."
# file: "./Dockerfile"
# push: true
# tags: ${{ steps.meta-ubuntu.outputs.tags }}
# labels: ${{ steps.meta-ubuntu.outputs.labels }}
# platforms: linux/amd64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# build-args: |
# GIT_COMMIT=${{ github.sha }}
# OS_VERSION=focal-20250404
# OS_VARIANT=ubuntu
# VITE_PROD_SECRET_KEY=${{ secrets.VITE_PROD_SECRET_KEY }}
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- uses: azure/setup-helm@v3
with:
version: latest
- name: Login to Docker
uses: docker/login-action@v3
with:
username: mjgpluralsh
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- run: make testup
# - name: download jwt verification key
# run: |
# echo $JWT_PUBLIC_KEY > config/pubkey.pem
# env:
# JWT_PUBLIC_KEY: ${{ secrets.JWT_PUBLIC_KEY }}
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-3-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-3
- name: Restore _build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-mix-3-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-3
- run: mix deps.get
- run: mix test
- name: Verify Changed files
run: |
git diff --exit-code -- priv || {
echo "::error Agent chart not downloaded, run mix test to compile it locally."
exit 1
}
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: workflow,job,repo,message,commit,author
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
if: always()
updateSchema:
name: Check that Schema is up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go/client/go.mod
cache: true
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-3-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-3
- name: Restore _build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-mix-3-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-3
- name: get dependencies
run: mix deps.get
- name: update schema
run: MIX_ENV=test mix absinthe.schema.sdl --schema Console.GraphQl schema/schema.graphql
- name: Verify Changed files
run: |
git diff --exit-code -- schema/schema.graphql || {
echo "::error Schema has changed changed. Please run 'make update-schema' and commit the changes."
exit 1
}