Skip to content

Commit

Permalink
ci: Release to Garage, stop mirroring to Sourcehut
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Nov 11, 2024
1 parent 9d05fe7 commit 0b78517
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
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
2 changes: 2 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
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 Down

0 comments on commit 0b78517

Please sign in to comment.