From a84916bb25199191f9f6ebca336686508b079d64 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 30 Jul 2024 18:55:06 +0200 Subject: [PATCH 1/3] Update entrypoint.sh --- container/entrypoint.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 container/entrypoint.sh diff --git a/container/entrypoint.sh b/container/entrypoint.sh old mode 100644 new mode 100755 From 838db79c888fd2359db2a11eeb3955ac986a9a4f Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 30 Jul 2024 19:02:28 +0200 Subject: [PATCH 2/3] fix: building image workflow --- .github/workflows/ci.yaml | 48 +++++++++++++++++++++++++++++++++++++++ container/entrypoint.sh | 4 ++-- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..51f3c4b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,48 @@ +--- +name: "Build" + +on: + push: + paths-ignore: + - "**.md" + +env: + IMAGE_NAME: vatsim-scandinavia/handover + TARGET_PLATFORMS: linux/amd64,linux/arm64 + +jobs: + build-container: + name: Build Events Container + runs-on: ubuntu-latest + steps: + - name: configure docker buildx + uses: docker/setup-buildx-action@v2 + + - name: login to github container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: setup container metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=pr + type=sha,event=branch,prefix= + type=semver,event=tag,pattern=v{{version}} + type=semver,event=tag,pattern=v{{major}} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + + - name: build & push container image + uses: docker/build-push-action@v4 + with: + context: "{{defaultContext}}:." + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: ${{ env.TARGET_PLATFORMS }} \ No newline at end of file diff --git a/container/entrypoint.sh b/container/entrypoint.sh index 521fc33..5288b90 100755 --- a/container/entrypoint.sh +++ b/container/entrypoint.sh @@ -7,12 +7,12 @@ SELF_SIGNED_CERT=/etc/ssl/certs/apache-selfsigned.crt if [ ! -f "$SELF_SIGNED_KEY" ] || [ ! -f "$SELF_SIGNED_CERT" ]; then # Generate a self-signed cert to support SSL connections - openssl req -x509 -nodes -days 358000 -newkey rsa:2048 -keyout "$SELF_SIGNED_KEY" -out "$SELF_SIGNED_CERT" -subj "/O=Your vACC/CN=Control Center" + openssl req -x509 -nodes -days 358000 -newkey rsa:2048 -keyout "$SELF_SIGNED_KEY" -out "$SELF_SIGNED_CERT" -subj "/O=Your vACC/CN=Events" fi if [ -z "$APP_KEY" ] && [ ! -f "$CONTROL_CENTER_ROOT/.env" ]; then echo "################################################################################" - echo "WARNING: You need to follow the configuration guide for Control Center" + echo "WARNING: You need to follow the configuration guide" echo "################################################################################" echo "WARNING: Copying over example .env file" cp container/example-prod.env .env From b052977ac1c513682f192201d39df042501e74f5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 30 Jul 2024 19:07:29 +0200 Subject: [PATCH 3/3] Update package-lock.json --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index ee7794e..b63d954 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "Discord-Manager", + "name": "app", "lockfileVersion": 3, "requires": true, "packages": {