|
| 1 | +--- |
| 2 | +title: "Setting up Digger EE" |
| 3 | +--- |
| 4 | + |
| 5 | +## Prerequesites |
| 6 | +- Digger CE configured |
| 7 | +- Automatic access to Actions via Github Connect enabled in Github Enterprise Server - [github docs](https://docs.github.com/en/enterprise-server@3.11/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect) |
| 8 | + |
| 9 | +## Get a new Digger token |
| 10 | +- Go to [cloud.digger.dev](https://cloud.digger.dev) |
| 11 | +- Go to API tokens in the sidebar |
| 12 | +- Press "Generate Token" |
| 13 | +- Copy the value; save securely (you will need it later) |
| 14 | + |
| 15 | +## Update your workflow file to use Digger EE |
| 16 | +- point `uses` to `diggerhq/digger-ee@v0.2.6-ee` (use relevant version) |
| 17 | +- set your Digger token as `DIGGER_TOKEN` |
| 18 | + |
| 19 | +``` |
| 20 | +name: Digger Plan |
| 21 | +
|
| 22 | +on: |
| 23 | + pull_request: |
| 24 | + branches: [ "main" ] |
| 25 | + types: [ opened, synchronize ] |
| 26 | + issue_comment: |
| 27 | + types: [created] |
| 28 | + workflow_dispatch: |
| 29 | +
|
| 30 | +
|
| 31 | +jobs: |
| 32 | + plan: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + permissions: |
| 35 | + contents: write # required to merge PRs |
| 36 | + id-token: write # required for workload-identity-federation |
| 37 | + pull-requests: write # required to post PR comments |
| 38 | + statuses: write # required to validate combined PR status |
| 39 | +
|
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + # Unlike GCP; the role assumption is handled inline |
| 43 | + - uses: actions/checkout@v4 |
| 44 | + - name: digger run |
| 45 | + uses: diggerhq/digger-ee@v0.2.6-ee # HERE |
| 46 | + with: |
| 47 | + setup-aws: true |
| 48 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 49 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 50 | + aws-region: us-east-1 |
| 51 | + env: |
| 52 | + GITHUB_CONTEXT: ${{ toJson(github) }} |
| 53 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + DIGGER_TOKEN: ${{ secrets.GITHUB_TOKEN }} # HERE |
| 55 | +``` |
0 commit comments