Skip to content

Initial commit for databrickslabs/sandbox/acceptance #35

Initial commit for databrickslabs/sandbox/acceptance

Initial commit for databrickslabs/sandbox/acceptance #35

name: acceptance
on:
pull_request:
types: [opened, synchronize]
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
acceptance:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# - uses: azure/login@v1
# with:
# client-id: ${{ var.ARM_CLIENT_ID }}
# tenant-id: ${{ secrets.ARM_TENANT_ID }}
# subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
- name: DEBUG
run: |
echo "$GITHUB_CONTEXT"
env | sort
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Get Job ID from GH API
id: get-job-id
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
jobs=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id}}/attempts/${{ github.run_attempt }}/jobs)
job_id=$(echo $jobs | jq -r '.jobs[] | select(.runner_name=="${{ runner.name }}") | .id')
echo "job_id=$job_id" >> $GITHUB_OUTPUT
- name: Display Job ID
run: |
echo Job ID: ${{ steps.get-job-id.outputs.job_id }}
echo My full job URL is ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}
- name: Acceptance
uses: databrickslabs/sandbox/acceptance@gh-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}