Azure / actions-workflow-samples

Help developers to easily get started with GitHub Action workflows to deploy to Azure
https://github.com/Azure/actions
MIT License
446 stars 626 forks source link

[Question] Access to repositories information from another account #148

Open Drjacky opened 1 year ago

Drjacky commented 1 year ago

https://github.com/Azure/actions-workflow-samples/blob/master/assets/create-secrets-for-GitHub-workflows.md

How to create secret for all repositories of a GitHub account A, to use it in another GitHub account B?

TheProdigyLeague commented 10 months ago

No tech guru here, but hope this helps nonetheless... /workflow/build/Deployment/Node.js | \Web.app ---> Azure(cTM) \user \profile From your Azure fs,

+ File: .github/workflows/workflow.yml

on: push

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    # chkout repo
    - name: 'Checkout Github Action' 
      uses: actions/checkout@master

    - name: Setup Node 10.x
      uses: actions/setup-node@v1
      with:
        node-version: '10.x'
    - name: 'npm install, build, and test'
      run: |
        npm install
        npm run build --if-present
        npm run test --if-present

    - name: 'Run acct A and publish secret for @Drjacky  Azure/repo'
      uses: azure/webapps-deploy@v2
      with: 
        app-name: node-rn
        publish-profile: ${{ secrets.azureWebAppPublishProfile }}
- .portal, .crypto

Follow these steps to use it on Acct B: