Mount that volume for data presistence #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Repo SyncOps | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
repo-sync: | |
runs-on: ubuntu-latest | |
# Only sync fron the main repo | |
if: github.repository == 'internal-recaptime-dev/infra-internals' | |
steps: | |
- name: Get secrets from Doppler as secrets | |
id: doppler | |
uses: dopplerhq/secrets-fetch-action@8ac64b8ccc134fdf67414464dadf61255d71d34c | |
with: | |
doppler-token: ${{ secrets.DOPPLER_TOKEN }} | |
inject-env-vars: true | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ env.RTDEVBOT_GITHUB_TOKEN }} | |
persist-credentials: true | |
fetch-depth: 0 | |
ref: main | |
- name: Setup | |
run: | | |
git config user.name RecapTimeBot | |
git config user.email service-accounts+github@crew.recaptime.dev | |
sudo wget https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo -O /usr/bin/git-filter-repo | |
sudo chmod +x /usr/bin/git-filter-repo | |
- name: Dry-run | |
run: | | |
echo ::group::Running a dry-run of git filter-repo | |
git filter-repo --dry-run --sensitive-data-removal --path-glob '*/stack.env' --path stack.env --path-glob 'docker/**/*.env' --path-glob 'config/**/*' --force --invert-paths | |
echo | |
cat .git/filter-repo/fast-export.original | |
echo | |
cat .git/filter-repo/fast-export.filtered | |
echo ::endgroup:: | |
- name: Deploy | |
run: | | |
git filter-repo --sensitive-data-removal --path-glob '*/stack.env' --path stack.env --path-glob 'docker/**/*.env' --path-glob 'config/**/*' --force --invert-paths | |
git remote add pub https://RecapTimeBot:${{env.RTDEVBOT_GITHUB_TOKEN}}@github.com/internal-recaptime-dev/infra-internals-public.git | |
git push pub --force --mirror | |
git remote remove pub |