Skip to content

Commit

Permalink
feat(catalogue): merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsJohansen87 committed Feb 6, 2024
2 parents 5d35e6d + eaee5f9 commit 7a64714
Show file tree
Hide file tree
Showing 18 changed files with 986 additions and 86 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/docker-develop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Develop Image samply/lens-web-components
name: Build and Push Develop Image samply/lens

on:
push:
Expand All @@ -9,13 +9,21 @@ on:
- develop
jobs:
build:
# Necessary after this repository was renamed from samply/lens-web-components to samply/lens
permissions:
contents: read
packages: write
pull-requests: read
security-events: write
statuses: read
# This workflow defines how a samply docker image is built, tested and published.
# Visit: https://github.com/samply/github-workflows/blob/main/.github/workflows/docker-ci.yml, for more information
uses: samply/github-workflows/.github/workflows/docker-ci.yml@main
with:
image-name: "samply/lens"
build-args: |
TARGET_ENVIRONMENT=staging
build-platforms: "linux/amd64"
# This passes the secrets from calling workflow to the called workflow
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build and Push Image samply/lens-web-components
name: Build and Push Image samply/lens

on:
push:
branches:
- main
# Build then a new version is tagged
tags:
- '*.*.*'
- 'v*.*.*'
pull_request:
branches:
- main
Expand All @@ -15,13 +15,21 @@ on:
- cron: '0 1 * * *'
jobs:
build:
# Necessary after this repository was renamed from samply/lens-web-components to samply/lens
permissions:
contents: read
packages: write
pull-requests: read
security-events: write
statuses: read
# This workflow defines how a samply docker image is built, tested and published.
# Visit: https://github.com/samply/github-workflows/blob/main/.github/workflows/docker-ci.yml, for more information
uses: samply/github-workflows/.github/workflows/docker-ci.yml@main
with:
image-name: "samply/lens"
build-args: |
TARGET_ENVIRONMENT=production
build-platforms: "linux/amd64"
# This passes the secrets from calling workflow to the called workflow
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Samply.Lens Github Workflow"
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- name: "Build @samply/lens"
run: npm run build
- name: "Publish @samply/lens"
run: cd dist/ && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

33 changes: 33 additions & 0 deletions .github/workflows/verify-new-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Samply.Lens verify new Code"
on:
pull_request:
branches:
- main
- develop
push:
branches:
- develop

jobs:
verify-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npm ci
# for now disable code format check, will be activated later
# name: "Check Code Format"
# run: npm run format:check
- name: "Check Security"
run: npm run security:check
# - name: "Verify Commit Messages"
# run: npm run lint:commits
# - name: "Svelte Check"
# run: npm run check
# for now disable linting, will be activated later
# run: npm run lint
22 changes: 22 additions & 0 deletions .github/workflows/verify-new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Samply.Lens verify new Release"
on:
pull_request:
branches:
- main

jobs:
verify-new-release:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git checkout --track origin/main
- run: git checkout --track origin/develop
- name: "Ensure Package Version changed"
run: |
if [ "$(git diff main develop -- package.json | grep version | wc -l)" -eq 0 ]; then \
echo "::error:: Please run `npm run version` before merging to main!"; \
exit 1; \
fi
Loading

0 comments on commit 7a64714

Please sign in to comment.