1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-02 01:32:41 +00:00

ci: Complete dev container configuration (#3052)

This commit is contained in:
2025-06-05 18:33:21 -05:00
parent 1c3f22015c
commit fd0d995cf8
18 changed files with 404 additions and 538 deletions

View File

@ -1,9 +1,7 @@
name: ☁️ Build Container
# Configures this workflow to run every time a change is pushed to the branch called `release`.
# Configures this workflow to run every release.
on:
push:
branches: ["main"]
release:
types: [published]
workflow_dispatch:
@ -75,6 +73,12 @@ jobs:
flavor: |
latest=${{ github.event_name == 'release' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
@ -85,6 +89,9 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
cleanup:
if: ${{ always() }}

View File

@ -57,6 +57,18 @@ jobs:
echo "EXTRA_FLAGS=""$EXTRA_FLAGS" --production""
} >> "$GITHUB_ENV"
- name: Set base navigation URLs for production build
if: inputs.context == 'production'
run: |
{
echo "MAIN_SITE_BASE_URL=https://www.privacyguides.org/en/"
echo "MAIN_SITE_ABOUT_URL=https://www.privacyguides.org/en/about/"
echo "MAIN_SITE_RECOMMENDATIONS_URL=https://www.privacyguides.org/en/tools/"
echo "MAIN_SITE_KNOWLEDGE_BASE_URL=https://www.privacyguides.org/en/basics/why-privacy-matters/"
echo "ARTICLES_SITE_BASE_URL=https://www.privacyguides.org/articles/"
echo "VIDEOS_SITE_BASE_URL=https://www.privacyguides.org/videos/"
} >> "$GITHUB_ENV"
- name: Set Metadata for Privileged Builds
if: inputs.privileged
run: |