Skip to content

tshoot output

tshoot output #24

name: create-issue-branch
on:
issues:
types: [opened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create Issue Branch
id: Create_Issue_Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create new file from template
id: Create_new_file
run: |
echo ${{ steps.Create_Issue_Branch.outputs.branchName }}
git checkout -b ${{ steps.Create_Issue_Branch.outputs.branchName }}
python scripts/drop_rules_create.py --application_name test_app
echo "file_created=true" >> $GITHUB_ENV
# echo "This is a new file" > new-file.txt
# ls -la
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit new file
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# git add new-file.txt
git add drop_rule_test_app.tf
ls -la scripts/
git commit -m "Add new file to new branch" || echo "No changes to commit"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push new branch
if: env.file_created == 'true'
run: |
git push origin ${{ steps.Create_Issue_Branch.outputs.branchName }}