add required_contexts github-script-poc.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github-script-poc | |
on: | |
push: | |
jobs: | |
poc-test: | |
runs-on: ubuntu-latest | |
name: Sandbox Testing | |
steps: | |
# - name: View context attributes | |
# uses: actions/github-script@v7 | |
# with: | |
# script: console.log(context) | |
- name: Register Sample Deployment | |
uses: actions/github-script@v4 | |
with: | |
script: | | |
const deployment = await github.repos.createDeployment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: context.ref, | |
auto_merge: false, | |
description: "Sample GitHub-Script Deployment", | |
required_contexts: [], | |
environment: "GitHub.Scripts (preview)", | |
production_environment: false | |
}); |