Skip to content

Commit

Permalink
issue #4: reusable workflow add and commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vivalareda committed Dec 20, 2023
1 parent 7225ec4 commit a9d4a1a
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/workflow-lint-test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -85,16 +85,22 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Print for debug
run: echo "${{ env.GIT_BRANCH_NAME }}"
# - name: Push new file
# if: steps.compare_values.outputs.update_value == 'true'
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Actions"
# git add .github/workflows/gcp-deployment.yml
# git commit -m "Update threshold"
# git push
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Push new file
- name: Commit changes
if: steps.compare_values.outputs.update_value == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add .github/workflows/gcp-deployment.yml
git commit -m "Update threshold"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions Bot
author_email: [email protected]
message: 'Update threshold'
add: '.github/workflows/gcp-deployment.yml'

0 comments on commit a9d4a1a

Please sign in to comment.