Skip to content

Commit

Permalink
Merge pull request #721 from culturecreates/enhancement/docker
Browse files Browse the repository at this point in the history
Added workflow to build docker image
  • Loading branch information
sahalali authored Oct 26, 2023
2 parents 00ef5b3 + a793b7f commit 6db5860
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Create and build footlight-app docker image

on:
push:
branches:
- develop
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/footlight-app

jobs:

build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
footlight-app:
- 'footlight-app/**'
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PAT }}

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

- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_REACT_APP_API_URL: "http://localhost:3001/"
envkey_REACT_APP_ARTS_DATA_URI: "https://api.artsdata.ca/"
envkey_REACT_APP_ARTS_DATA_PAGE_URI: "https://kg.artsdata.ca/resource/"
envkey_REACT_APP_DEEPL_URL: "https://www.deepl.com/translator#"
envkey_REACT_APP_HELP_EN_URL: "https://footlight.gitbook.io/footlight-cms-guide"
envkey_REACT_APP_HELP_FR_URL: "https://footlight.gitbook.io/guide-footlight-cms"
envkey_REACT_APP_FEATURE_FLAG_QUICK_CREATE_ORGANIZATION: true
envkey_REACT_APP_FEATURE_FLAG_ORG_PERSON_PLACE_VIEW: true
envkey_REACT_APP_FEATURE_FLAG_QUICK_CREATE_PEOPLE_PLACE: true
envkey_REACT_APP_FEATURE_FLAG_EDIT_SCREEN_PEOPLE_PLACE_ORGANIZATION: true
envkey_REACT_APP_FEATURE_FLAG_USERS: true
envkey_REACT_APP_FEATURE_FLAG_TAXONOMY: true
envkey_REACT_APP_FEATURE_FLAG_IMAGE_CROP: true
envkey_REACT_APP_ENV: "staging"
envkey_REACT_APP_INVITE_URL: "http://staging.cms.footlight.io/join?invitationId="
envkey_REACT_APP_ACCEPT_URL: "http://staging.cms.footlight.io/accept?invitationId="
directory: footlight-app
file_name: .env
fail_on_empty: false

- name: Create secret key files
run: |
mkdir -p secrets
echo "${{ secrets.PRIVATE_KEY_PEM_PRO }}" | base64 -d >> secrets/private-key.pem
echo "${{ secrets.PUBLIC_CERTIFICATE_PEM_PRO }}" | base64 -d >> secrets/public-certificate.pem
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: footlight-app
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 6db5860

Please sign in to comment.