jpoehnelt / secrets-sync-action

A Github Action that can sync secrets from one repository to many others.
https://github.com/marketplace/actions/secrets-sync-action
Apache License 2.0
314 stars 92 forks source link

Auto Remove Existing SECRETS and add only the new #19

Closed varunsridharan closed 3 years ago

varunsridharan commented 4 years ago

I recently started using this action to my certain SECRETS available to repos.

but then i found out that this action does not remove Existing SECRETS

Let me give you an example

I have configured my workflow like below

      - name: "🔄 Sync Twitter Logins"
        uses: google/secrets-sync-action@v1.4.1
        with:
          repositories_list_regex: false
          SECRETS: |
            ^TWITTER_
          REPOSITORIES: ${{ env.TWITTER_LOGINS_REPOS }}
          DRY_RUN: ${{ env.DRY_RUN }}
          CONCURRENCY: ${{ env.CONCURRENCY }}
          GITHUB_TOKEN: ${{ secrets.GH_PUBLIC_PRIVATE_TOKEN }}

and i have below EVN's configured

env:
  DRY_RUN: false
  CONCURRENCY: 50
  TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
  TWITTER_API_SECRET_KEY: ${{ secrets.TWITTER_API_SECRET_KEY }}
  TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
  TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
  TWITTER_LOGINS_REPOS: |
    varunsridharan/****
    varunsridharan/****
    varunsridharan/****
    varunsridharan/****
    varunsridharan/****

And when i ran the action to syn ll the SECRETS it also added TWITTER_LOGINS_REPOS to the repo

https://s2.do-spaces.com/2020/Jun/29/1593409947-114.jpg

I know its my mistake i should have configured the Regex Properly ..

but i would be great if this action and force remove all the matching SECRETS and add only the new matched SECRETS !

mastermind369 commented 4 years ago

15

varunsridharan commented 4 years ago

@mastermind369 i tried with latest version. but it did not delete it :-( !! Confused.

mastermind369 commented 4 years ago

I'm trying to find your account again. if this doesn't work I'm sorry, I'm just trying.

jpoehnelt commented 4 years ago

There is no delete mechanism.

jpoehnelt commented 3 years ago

Closing with #47