From 62e04085d9b1042cce45ea48fe41d7bd69e4d02b Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 23 Oct 2024 15:32:03 -0500 Subject: [PATCH] Change CumulusCI commit sha --- .github/workflows/org-login-slack.yml | 88 ++++++++++++++------------- Dockerfile | 2 +- 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/.github/workflows/org-login-slack.yml b/.github/workflows/org-login-slack.yml index 65809b4..a8b8d24 100644 --- a/.github/workflows/org-login-slack.yml +++ b/.github/workflows/org-login-slack.yml @@ -1,51 +1,53 @@ name: Org Login via Slack on: - workflow_dispatch: - inputs: - slack_username: - description: 'Slack username to send the login URL' - required: true - environment: - description: 'Salesforce environment to use' - required: true - type: environment + workflow_dispatch: + inputs: + slack_username: + description: "Slack username to send the login URL" + required: true + environment: + description: "Salesforce environment to use" + required: true + type: environment + secrets: + sfdx-auth-url: + required: true + slack-bot-token: + required: true jobs: - generate-login-url: - runs-on: ubuntu-latest - container: - image: ghcr.io/muselab-d2x/d2x:cumulusci-next-snapshots - options: --user root - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - environment: ${{ github.event.inputs.environment }} + generate-login-url: + runs-on: ubuntu-latest + container: + image: ghcr.io/muselab-d2x/d2x:cumulusci-next-snapshots + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github-token }} + environment: ${{ github.event.inputs.environment }} - steps: - - name: Checkout code - uses: actions/checkout@v4 + steps: + - name: Checkout code + uses: actions/checkout@v4 - - name: Generate Login URL - env: - SFDX_AUTH_URL: ${{ secrets.SFDX_AUTH_URL }} - run: | - echo "$SFDX_AUTH_URL" > auth.url - sf org login sfdx-url -f auth.url - sf org open -r --json | jq -r '.result.url' > login_url.txt + - name: Generate Login URL + env: + SFDX_AUTH_URL: ${{ secrets.sfdx-auth-url }} + run: | + echo "$SFDX_AUTH_URL" > auth.url + sf org login sfdx-url -f auth.url + sf org open -r --json | jq -r '.result.url' > login_url.txt - - name: Read login URL - id: read_url - run: echo "login_url=$(cat login_url.txt)" >> $GITHUB_OUTPUT - - - name: Send Slack DM - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - run: | - curl -X POST -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ - -H "Content-Type: application/json" \ - -d '{ - "channel": "@${{ github.event.inputs.slack_username }}", - "text": "Here'"'"'s your Salesforce login URL: ${{ steps.read_url.outputs.login_url }}" - }' \ - https://slack.com/api/chat.postMessage \ No newline at end of file + - name: Send Slack DM + env: + SLACK_BOT_TOKEN: ${{ secrets.slack-bot-token }} + run: | + echo "login_url=$(cat login_url.txt)" >> $GITHUB_OUTPUT + curl -X POST -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "channel": "@${{ github.event.inputs.slack_username }}", + "text": "Here'"'"'s your Salesforce login URL for ${{ github.event.inputs.environment }}: ${{ steps.read_url.outputs.login_url }}" + }' \ + https://slack.com/api/chat.postMessage diff --git a/Dockerfile b/Dockerfile index 7d9a4f2..9a75b49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | g apt-get update && apt-get install -y gh # Install CumulusCI -RUN pip --no-cache-dir install git+https://github.com/muselab-d2x/CumulusCI@7c32e340aa783a179cb217fab56abf7f8c540f6d cookiecutter keyrings.alt +RUN pip --no-cache-dir install git+https://github.com/muselab-d2x/CumulusCI@c3d0c057302f4d31c3ae7353492c9951c1feadd6 cookiecutter keyrings.alt # Copy devhub auth script and make it executable COPY devhub.sh /usr/local/bin/devhub.sh