Skip to content

add required_contexts github-script-poc.yml #3

add required_contexts github-script-poc.yml

add required_contexts github-script-poc.yml #3

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
});