Skip to content

Commit

Permalink
feat: github actions for amber server
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed May 17, 2024
1 parent d73261d commit 5cc03da
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 132 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
env:
REGISTRY: index.docker.io
IMAGE_NAME: obiba/amber
permissions:
id-token: write
contents: read
attestations: write
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=match,pattern=amber-(\d+.\d+.\d+)
type=match,pattern=amber-(\d+.\d+)
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
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: false

File renamed without changes.
35 changes: 0 additions & 35 deletions Makefile

This file was deleted.

40 changes: 0 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,3 @@ Amber server Dockerfile
Amber server is a [nodejs](https://nodejs.org/) application. Most of the runtime parameters can be set using [environment variables]((https://github.com/obiba/amber/blob/main/README.md#environment-variables)). For advanced usage, the runtime settings **can** also be amended by copying a local [./config/production.json](https://github.com/obiba/amber/blob/main/config/production.json) file.

The `Dockerfile` for a production Amber server will then look like: [Amber Server template](https://github.com/obiba/amber-template/tree/master/amber)


Amber Studio app Dockerfile
---------------------------

Amber Studio is a [Quasar SPA](https://quasar.dev/quasar-cli-vite/developing-spa/introduction) (single page application) web app delivered by a [NGINX](https://www.nginx.com/) web server. The web app **must** be built with the site specific settings such as the Amber server URL and the [reCAPTCHA](https://developers.google.com/recaptcha/) site key.

Optionally, some source files can be modified as well:

* [settings.json](https://github.com/obiba/amber-studio/blob/main/settings.json) file that is a simple way of tweaking the default theme and for adding new languages.
* [public](https://github.com/obiba/amber-studio/tree/main/public) folder that contains the app icons.
* [src/css](https://github.com/obiba/amber-studio/tree/main/src/css) folder that contains the [SCSS](https://sass-lang.com/documentation/syntax) files.

The `Dockerfile` for a production web server providing the Amber Studio app will then look like: [Amber Studio template](https://github.com/obiba/amber-template/tree/master/amber-studio)

Amber Collect app Dockerfile
----------------------------

Amber Collect is a [Quasar PWA](https://quasar.dev/quasar-cli-vite/developing-pwa/introduction) (progressive web application) web app delivered by a [NGINX](https://www.nginx.com/) web server. The web app **must** be built with the site specific settings such as the Amber server URL and the [reCAPTCHA](https://developers.google.com/recaptcha/) site key.

Optionally, some source files can be modified as well:

* [settings.json](https://github.com/obiba/amber-collect/blob/main/settings.json) file that is a simple way of tweaking the default theme and for adding new languages.
* [public](https://github.com/obiba/amber-collect/tree/main/public) folder that contains the app icons.
* [src/css](https://github.com/obiba/amber-collect/tree/main/src/css) folder that contains the [SCSS](https://sass-lang.com/documentation/syntax) files.

The `Dockerfile` for a production web server providing the Amber Collect app will then look like: [Amber Collect template](https://github.com/obiba/amber-template/tree/master/amber-collect)

Amber Visit app Dockerfile
----------------------------

Amber Collect is a [Quasar SPA](https://quasar.dev/quasar-cli-vite/developing-spa/introduction) (single page application) web app delivered by a [NGINX](https://www.nginx.com/) web server. The web app **must** be built with the site specific settings such as the Amber server URL and the [reCAPTCHA](https://developers.google.com/recaptcha/) site key.

Optionally, some source files can be modified as well:

* [settings.json](https://github.com/obiba/amber-visit/blob/main/settings.json) file that is a simple way of tweaking the default theme and for adding new languages.
* [public](https://github.com/obiba/amber-visitt/tree/main/public) folder that contains the app icons.
* [src/css](https://github.com/obiba/amber-visit/tree/main/src/css) folder that contains the [SCSS](https://sass-lang.com/documentation/syntax) files.

The `Dockerfile` for a production web server providing the Amber Visit app will then look like: [Amber Visit template](https://github.com/obiba/amber-template/tree/master/amber-visit)
19 changes: 0 additions & 19 deletions amber-collect/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions amber-studio/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions amber-visit/Dockerfile

This file was deleted.

0 comments on commit 5cc03da

Please sign in to comment.