Skip to content

Commit

Permalink
Change CumulusCI commit sha
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz committed Oct 23, 2024
1 parent d851d33 commit 62e0408
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 44 deletions.
88 changes: 45 additions & 43 deletions .github/workflows/org-login-slack.yml
Original file line number Diff line number Diff line change
@@ -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
- 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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62e0408

Please sign in to comment.