Skip to content

Commit

Permalink
Add github container build
Browse files Browse the repository at this point in the history
  • Loading branch information
berrydenhartog committed Jun 26, 2024
1 parent 2448ff2 commit 9fd2c22
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 9 deletions.
11 changes: 5 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly
60 changes: 60 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: build

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: "minbzk/beslisboom"

jobs:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
actions: read
steps:
- uses: actions/checkout@v4

# for testing we copy it. In production we should use a link to github
- name: copy files
run: |
cp decision-tree.yaml frontend/public/decision-tree.yaml
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64,linux/arm64,darwin/amd64
35 changes: 32 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
determine-role-ex-transparantie-inc-subtree.json
subtree-ex-role.json
transparantie-tree.json
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo

up.txt

0 comments on commit 9fd2c22

Please sign in to comment.