diff --git a/.github/actions/alpha/action.yaml b/.github/actions/alpha/action.yaml index ffbc4cff..25e9e7fe 100644 --- a/.github/actions/alpha/action.yaml +++ b/.github/actions/alpha/action.yaml @@ -4,6 +4,12 @@ inputs: app-name: description: 'app name' required: true + npm-token: + description: 'npm token' + required: true + github-token: + description: 'github token' + required: true runs: using: composite @@ -27,5 +33,5 @@ runs: title: 'chore: Update versions' cwd: '.release' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ inputs.github-token }} + NPM_TOKEN: ${{ inputs.npm-token }} diff --git a/.github/actions/gh-pages/action.yaml b/.github/actions/gh-pages/action.yaml index 019fb084..cd1fdac1 100644 --- a/.github/actions/gh-pages/action.yaml +++ b/.github/actions/gh-pages/action.yaml @@ -1,5 +1,16 @@ name: github-pages-cicd +inputs: + server-endpoint: + description: 'server endpoint' + required: true + wallet-connect-project-id: + description: 'wallet connect project id' + required: true + api-token-github: + description: 'api token github' + required: true + runs: using: composite steps: @@ -17,8 +28,8 @@ runs: APP_NAME: canonical-bridge BASE_PATH: /canonical-bridge ASSET_PREFIX: /canonical-bridge - SERVER_ENDPOINT: ${{ vars.SERVER_ENDPOINT }} - WALLET_CONNECT_PROJECT_ID: ${{ vars.WALLET_CONNECT_PROJECT_ID }} + SERVER_ENDPOINT: ${{ inputs.server-endpoint }} + WALLET_CONNECT_PROJECT_ID: ${{ inputs.wallet-connect-project-id }} - name: Install & build shell: bash @@ -29,7 +40,7 @@ runs: - name: Pushes to another repository uses: cpina/github-action-push-to-another-repository@main env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + API_TOKEN_GITHUB: ${{ inputs.api-token-github }} with: source-directory: './apps/canonical-bridge-ui/dist' destination-github-username: 'wenty22' diff --git a/.github/workflows/qa-deploy.yaml b/.github/workflows/qa-deploy.yaml index 97680bfa..bcd08d57 100644 --- a/.github/workflows/qa-deploy.yaml +++ b/.github/workflows/qa-deploy.yaml @@ -69,15 +69,23 @@ jobs: - name: Deploy github pages if: contains(steps.get-comment.outputs.APP_NAME, 'canonical-bridge-ui') uses: ./.github/actions/gh-pages + with: + server-endpoint: ${{ vars.SERVER_ENDPOINT }} + wallet-connect-project-id: ${{ vars.WALLET_CONNECT_PROJECT_ID }} + api-token-github: ${{ secrets.API_TOKEN_GITHUB }} - name: Deploy SDK if: contains(steps.get-comment.outputs.APP_NAME, 'canonical-bridge-sdk') uses: ./.github/actions/alpha with: app-name: ${{steps.get-comment.outputs.APP_NAME}} + npm-token: ${{ secrets.NPM_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Deploy Widget if: contains(steps.get-comment.outputs.APP_NAME, 'canonical-bridge-widget') uses: ./.github/actions/alpha with: app-name: ${{steps.get-comment.outputs.APP_NAME}} + npm-token: ${{ secrets.NPM_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }}