Update docker-compose.yml #2
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 apt update && sudo apt install git-filter-repo -y | |
- name: Dry-run | |
run: | | |
echo ::group::Running a dry-run of git filter-repo | |
git filter-repo --dry-run --path docker/*/stack.env --path config/**/* --invert-paths --force | |
echo ::endgroup:: | |
echo ::group::Dry run results | |
cat .git/filter-repo/fast-export.original | |
echo | |
cat .git/filter-repo/fast-export.filtered | |
echo ::endgroup:: | |
- name: Deploy | |
run: | | |
git filter-repo --path docker/*/stack.env --path config/**/* --invert-paths --force | |
git remote add pub https://RecapTimeBot:${{env.RTDEVBOT_GITHUB_TOKEN}}@github.com/internal-recaptime-dev/infra-internals-public.git | |
git push pub --mirror | |
git remote remove pub |