Skip to content

Instantly share code, notes, and snippets.

@yishaihl
Created July 10, 2022 13:08
Show Gist options
  • Save yishaihl/6bfebdec026de71253c550130a52cd19 to your computer and use it in GitHub Desktop.
Save yishaihl/6bfebdec026de71253c550130a52cd19 to your computer and use it in GitHub Desktop.
pr_environment_workflow.yml
name: PR Environment Workflow
on:
pull_request:
types: [ labeled , synchronize , reopened , opened]
jobs:
push_docker_build_promote:
if: contains( github.event.pull_request.labels.*.name, 'k8s')
steps:
- name: add image tag label to pr
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['${{ steps.release.outputs.version }}']
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment