Update #6
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: Trigger Jenkins Job | |
on: | |
# Trigger the workflow on push events to the main branch or manual dispatch. | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
trigger: | |
name: Trigger Jenkins Build | |
runs-on: ubuntu-latest | |
steps: | |
# Debugging: Check if secrets are correctly passed. | |
- name: Debug Secrets | |
run: | | |
echo "Jenkins URL: ${{ secrets.URL }}" | |
echo "Jenkins User: ${{ secrets.USER }}" | |
echo "Jenkins Job: ${{ secrets.JOBS }}" | |
# Actual Jenkins trigger step | |
- name: Trigger Jenkins Job | |
uses: appleboy/jenkins-action@master | |
with: | |
url: ${{ secrets.URL }} | |
user: ${{ secrets.USER }} | |
token: ${{ secrets.TOKEN }} | |
job: ${{ secrets.JOBS }} | |
debug: true # Enable debugging information |