Migrating from GitHub Actions to RWX

Migrating Secrets

The easiest way to migrate secrets from GitHub Actions to RWX secrets is to use the RWX CLI from a GitHub Actions workflow to import them automatically.

Create the following file as .github/workflows/rwx-migration.yml in the repository that you'd like to migrate.

For the RWX_ACCESS_TOKEN, you can set one as a secret in GitHub Actions, and then use RWX_ACCESS_TOKEN: ${{ secrets.RWX_ACCESS_TOKEN }}

If you do not have access to set new secrets in GitHub Actions, you can also hardcode it in your workflow and then revoke it after the migration is complete.

name: RWX Migration

on: [push]

jobs:
  migrate:
    runs-on: ubuntu-latest

    steps:
      - name: Install RWX CLI
        run: |
          curl -L https://github.com/rwx-cloud/cli/releases/download/v1/rwx-linux-x86_64 > rwx
          chmod +x rwx
          ./rwx --version
      - name: Set Secrets
        run: |
          ./rwx vaults set-secrets \
            SOME_SECRET_1="${{ secrets.SOME_SECRET_1 }}" \
            SOME_SECRET_2="${{ secrets.SOME_SECRET_2 }}"
        env:
          RWX_ACCESS_TOKEN: '...'