Skip to content

Commit

Permalink
Updated dependencies to newer version.
Browse files Browse the repository at this point in the history
Added separate protocol build, since this needs to happend first.
Updated docker build to publish to GitHub container registry.
  • Loading branch information
harmen-xb committed Nov 6, 2024
1 parent eb54df6 commit 9ae4f49
Show file tree
Hide file tree
Showing 4 changed files with 3,652 additions and 3,528 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/cicd-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- feature/*

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-test:
uses: ./.github/workflows/build-and-test.yml
Expand All @@ -19,14 +23,31 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: user/app:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ COPY . .
# - Use yarn autoclean to remove unnecessary files from package dependencies
# - Remove unnecesarry files for the browser application
RUN yarn --pure-lockfile --skip-integrity-check --network-timeout 100000 && \
yarn build:protocol && \
yarn build:extensions && \
yarn theia:browser build \
yarn autoclean --init && \
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"build": "lerna run build",
"build:extensions": "lerna run --scope=\"crossmodel-lang\" build",
"build:protocol": "lerna run --scope=\"@crossbreeze/protocol\" build",
"clean": "lerna run clean && rimraf node_modules",
"format": "yarn prettier-eslint --write '**/*.{ts,tsx,js,cjs,mjs,css}' '**/package.json'",
"postinstall": "theia check:theia-version",
Expand Down
Loading

0 comments on commit 9ae4f49

Please sign in to comment.