Update README files (#71) #45
Workflow file for this run
This file contains hidden or 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: Mirror To gemini-cli-extensions/flutter | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| delete: | |
| # Ensures that only one mirror job runs at a time per branch. | |
| # Cancels any in-progress job on the same branch if a new push occurs. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| mirror: | |
| if: github.event_name == 'push' || (github.event_name == 'delete' && github.event.ref_type == 'tag') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup SSH and Push to Mirror | |
| run: | | |
| # 0. Check for the secret. | |
| if [[ -z "${{ secrets.GEMINI_CLI_EXTENSIONS_FLUTTER_MIRROR_KEY }}" ]]; then | |
| echo "SSH Secret not available, exiting." | |
| exit 0 | |
| fi | |
| # 1. Start the ssh-agent | |
| eval "$(ssh-agent -s)" | |
| # 2. Add the SSH private key from the secret to the agent | |
| echo "${{ secrets.GEMINI_CLI_EXTENSIONS_FLUTTER_MIRROR_KEY }}" | ssh-add - | |
| # 3. Add GitHub's public SSH keys to the known_hosts file for security. | |
| # Keys are sourced from: | |
| # https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints | |
| mkdir -p ~/.ssh | |
| echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts | |
| # 4. Push to the destination repository | |
| git push --force --mirror [email protected]:gemini-cli-extensions/flutter.git |