Skip to content

Commit

Permalink
Merge branch 'main' into simplex-group
Browse files Browse the repository at this point in the history
  • Loading branch information
friadev authored Nov 11, 2024
2 parents e17e682 + d62e221 commit fa2192a
Show file tree
Hide file tree
Showing 144 changed files with 2,095 additions and 1,244 deletions.
77 changes: 0 additions & 77 deletions .github/dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
# 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.
- name: Build and push Docker image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
push: true
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
strict:
type: boolean
default: false
cache:
type: boolean
default: true

permissions:
contents: read
Expand Down Expand Up @@ -57,6 +60,12 @@ jobs:
echo "BUILD_INSIDERS=true" >> "$GITHUB_ENV"
echo "EXTRA_FLAGS=""$EXTRA_FLAGS" --insiders"" >> "$GITHUB_ENV"
- name: Set Metadata for International Builds
if: inputs.lang != 'en'
run: |
echo "GITREVISIONDATE=false" >> "$GITHUB_ENV"
echo "GITAUTHORS=false" >> "$GITHUB_ENV"
- name: Set Metadata for Offline Mode
if: inputs.config == 'offline'
run: |
Expand Down Expand Up @@ -113,6 +122,7 @@ jobs:
- name: Restore Privacy Plugin Cache
uses: actions/cache/[email protected]
id: privacy_cache_restore
if: inputs.cache
with:
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }}
path: |
Expand All @@ -125,6 +135,7 @@ jobs:
- name: Restore Social Plugin Cache
uses: actions/cache/[email protected]
id: social_cache_restore
if: inputs.cache
with:
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
path: |
Expand All @@ -137,6 +148,7 @@ jobs:
- name: Restore Optimize Plugin Cache
uses: actions/cache/[email protected]
id: optimize_cache_restore
if: inputs.cache
with:
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
path: |
Expand Down Expand Up @@ -170,7 +182,7 @@ jobs:
- name: Find Privacy Plugin Cache
uses: actions/cache/[email protected]
if: steps.privacy_cache_restore.outputs.cache-hit != 'true'
if: steps.privacy_cache_restore.outputs.cache-hit != 'true' && inputs.cache
id: privacy_cache_test
with:
key: privacy-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/privacy/**') }}
Expand All @@ -180,7 +192,7 @@ jobs:
- name: Find Social Plugin Cache
uses: actions/cache/[email protected]
if: steps.social_cache_restore.outputs.cache-hit != 'true'
if: steps.social_cache_restore.outputs.cache-hit != 'true' && inputs.cache
id: social_cache_test
with:
key: social-cache-privacyguides/privacyguides.org-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
Expand All @@ -191,7 +203,7 @@ jobs:
- name: Find Optimize Plugin Cache
uses: actions/cache/[email protected]
if: steps.optimize_cache_restore.outputs.cache-hit != 'true'
if: steps.optimize_cache_restore.outputs.cache-hit != 'true' && inputs.cache
id: optimize_cache_test
with:
key: optimize-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
Expand All @@ -201,14 +213,14 @@ jobs:
- name: Save Privacy Plugin Cache
uses: actions/cache/[email protected]
if: steps.privacy_cache_test.outputs.cache-hit != 'true'
if: steps.privacy_cache_test.outputs.cache-hit != 'true' && inputs.cache
with:
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }}
path: .cache/plugin/privacy

- name: Save Social Plugin Cache
uses: actions/cache/[email protected]
if: steps.social_cache_test.outputs.cache-hit != 'true'
if: steps.social_cache_test.outputs.cache-hit != 'true' && inputs.cache
with:
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }}
path: |
Expand All @@ -217,7 +229,7 @@ jobs:
- name: Save Optimize Plugin Cache
uses: actions/cache/[email protected]
if: steps.optimize_cache_test.outputs.cache-hit != 'true'
if: steps.optimize_cache_test.outputs.cache-hit != 'true' && inputs.cache
with:
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }}
path: .cache/plugin/optimize
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/publish-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,3 @@ jobs:
with:
source-repo: "[email protected]:privacyguides/privacyguides.org.git"
destination-repo: "[email protected]:privacyguides/privacyguides.org.git"

sourcehut:
runs-on: ubuntu-latest
steps:
- name: Mirror to SourceHut
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.ACTIONS_SSH_KEY }}
with:
source-repo: "[email protected]:privacyguides/privacyguides.org.git"
destination-repo: "[email protected]:~jonaharagon/privacyguides.org"
20 changes: 17 additions & 3 deletions .github/workflows/publish-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
echo "pr_number=$(cat metadata/NR)" >> "$GITHUB_OUTPUT"
echo "sha=$(cat metadata/SHA)" >> "$GITHUB_OUTPUT"
deploy:
deploy_netlify:
needs: metadata
permissions:
contents: read
Expand All @@ -99,13 +99,27 @@ jobs:
secrets:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}

deploy_garage:
needs: metadata
permissions:
contents: read

uses: privacyguides/webserver/.github/workflows/deploy-garage-preview.yml@main
with:
alias: ${{ needs.metadata.outputs.pr_number }}
bucket: ${{ vars.PREVIEW_GARAGE_BUCKET }}
hostname: ${{ vars.PREVIEW_GARAGE_HOSTNAME }}
secrets:
PREVIEW_GARAGE_KEY_ID: ${{ secrets.PREVIEW_GARAGE_KEY_ID }}
PREVIEW_GARAGE_SECRET_KEY: ${{ secrets.PREVIEW_GARAGE_SECRET_KEY }}

comment:
permissions:
pull-requests: write
needs: [deploy, metadata]
needs: [deploy_netlify, metadata]
runs-on: ubuntu-latest
env:
address: ${{ needs.deploy.outputs.address }}
address: ${{ needs.deploy_netlify.outputs.address }}
steps:
- uses: thollander/[email protected]
with:
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ jobs:
lang: ${{ matrix.lang }}
context: production
continue-on-error: false
cache: false

build_blog:
needs: submodule
permissions:
contents: read
uses: ./.github/workflows/build-blog.yml
with:
repo: ${{ github.repository }}
ref: ${{ github.ref }}
continue-on-error: false

release:
name: Create release notes
Expand All @@ -84,12 +95,14 @@ jobs:
makeLatest: true

deploy:
needs: build
needs: [build, build_blog]
uses: privacyguides/webserver/.github/workflows/deploy-all.yml@main
secrets:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
PROD_MINIO_KEY_ID: ${{ secrets.PROD_MINIO_KEY_ID }}
PROD_MINIO_SECRET_KEY: ${{ secrets.PROD_MINIO_SECRET_KEY }}
PROD_GARAGE_KEY_ID: ${{ secrets.PROD_GARAGE_KEY_ID }}
PROD_GARAGE_SECRET_KEY: ${{ secrets.PROD_GARAGE_SECRET_KEY }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLUSTER_USERNAME: ${{ secrets.CLUSTER_USERNAME }}
Expand All @@ -99,5 +112,5 @@ jobs:

cleanup:
if: ${{ always() }}
needs: build
needs: [build, build_blog]
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/upload-crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v2.1.1
uses: crowdin/github-action@v2.2.0
with:
upload_sources: true
upload_sources_args: "--auto-update --delete-obsolete"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine as base
FROM python:3.13-alpine as base

LABEL org.opencontainers.image.source="https://github.com/privacyguides/privacyguides.org"

Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mkdocs-git-authors-plugin = "~=0.8"
mkdocs-macros-plugin = "~=1.0"
jieba = "~=0.42"
mkdocs-rss-plugin = "*"
mkdocs-glightbox = "*"

[dev-packages]
scour = "~=0.38"
Expand Down
Loading

0 comments on commit fa2192a

Please sign in to comment.