Skip to content

Commit

Permalink
Release (#22)
Browse files Browse the repository at this point in the history
* Add helm charts

* Rename to identity portal

* Add portal components

* Fix ci

* Fix ci

* Update configs

* Update keycloak realm

* Revert realm to master

* Add service calls and cookies

* Clear request uri on service change

* Fix cookie delete

* Add more service links

* Update ci

* Update ci

* Fix issue

* Fix ci

* Fix scrollbars

* Add refresh token

* Fix dockerfile

* Add offline access

* Revert offline token

* Add demo workflow

* Fix workflow

* Fix angular config

* Fix dockerfile

* Update README.md

* Update README.md
  • Loading branch information
daniel-pimenta-DME authored Jan 2, 2024
1 parent a35f8d6 commit d502bf7
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 14 deletions.
114 changes: 114 additions & 0 deletions .github/workflows/docker-publish-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [ "demo" ]
tags: [ 'v*.*.*' ]

env:
# Use docker.io for Docker Hub if empty
GITHUB_REGISTRY: ghcr.io
DOCKER_REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: 'v2.1.1'

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.GITHUB_REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=demo
type=ref,event=tag
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
push: ${{ github.event_name != 'pull_request' }}
build-args: CONFIGURATION=demo
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

- name: Log into registry ${{ env.DOCKER_REGISTRY }}
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: docker_meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: "{{defaultContext}}"
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
1 change: 1 addition & 0 deletions .github/workflows/docker-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
push: ${{ github.event_name != 'pull_request' }}
build-args: CONFIGURATION=develop
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-publish-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
push: ${{ github.event_name != 'pull_request' }}
build-args: CONFIGURATION=production
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
<!-- PROJECT LOGO -->
<br />
<p align="center">
<a href="https://github.com/EOEPCA/eoepca-portal">
<img src="images/logo.png" alt="Logo" width="80" height="80">
</a>

<h3 align="center">eoepca-portal</h3>

Expand Down Expand Up @@ -235,14 +232,14 @@ Project Link: [https://github.com/EOEPCA/eoepca-portal](https://github.com/EOEPC
- README.md is based on [this template](https://github.com/othneildrew/Best-README-Template) by [Othneil Drew](https://github.com/othneildrew).


[contributors-shield]: https://img.shields.io/github/contributors/EOEPCA/eoepca-portalsvg?style=flat-square
[contributors-shield]: https://img.shields.io/github/contributors/EOEPCA/eoepca-portal.svg?style=flat-square
[contributors-url]: https://github.com/EOEPCA/eoepca-portal/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/EOEPCA/eoepca-portalsvg?style=flat-square
[forks-shield]: https://img.shields.io/github/forks/EOEPCA/eoepca-portal.svg?style=flat-square
[forks-url]: https://github.com/EOEPCA/eoepca-portal/network/members
[stars-shield]: https://img.shields.io/github/stars/EOEPCA/eoepca-portalsvg?style=flat-square
[stars-shield]: https://img.shields.io/github/stars/EOEPCA/eoepca-portal.svg?style=flat-square
[stars-url]: https://github.com/EOEPCA/eoepca-portal/stargazers
[issues-shield]: https://img.shields.io/github/issues/EOEPCA/eoepca-portalsvg?style=flat-square
[issues-shield]: https://img.shields.io/github/issues/EOEPCA/eoepca-portal.svg?style=flat-square
[issues-url]: https://github.com/EOEPCA/eoepca-portal/issues
[license-shield]: https://img.shields.io/github/license/EOEPCA/eoepca-portalsvg?style=flat-square
[license-shield]: https://img.shields.io/github/license/EOEPCA/eoepca-portal.svg?style=flat-square
[license-url]: https://github.com/EOEPCA/eoepca-portal/blob/master/LICENSE
[build-shield]: https://www.travis-ci.com/EOEPCA/eoepca-portalsvg?branch=master
[build-shield]: https://www.travis-ci.com/EOEPCA/eoepca-portal.svg?branch=master
33 changes: 30 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@
}
]
},
"demo": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.demo.ts"
}
]
},
"develop": {
"budgets": [
{
Expand Down Expand Up @@ -115,11 +136,17 @@
"production": {
"browserTarget": "eoepca-portal:build:production"
},
"development": {
"browserTarget": "eoepca-portal:build:development"
"demo": {
"browserTarget": "eoepca-portal:build:demo"
},
"staging": {
"browserTarget": "eoepca-portal:build:staging"
},
"develop": {
"browserTarget": "eoepca-portal:build:develop"
}
},
"defaultConfiguration": "development"
"defaultConfiguration": "develop"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"watch": "ng build --watch --configuration develop",
"test": "ng test",
"start:production": "ng serve --configuration=production",
"start:staging": "ng serve --configuration=staging",
Expand Down Expand Up @@ -53,4 +53,4 @@
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.1.3"
}
}
}

0 comments on commit d502bf7

Please sign in to comment.