Merge pull request #380 from rhusar/stylization #44
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: Send event to WildFly s2i to Build and Deploy images when pushing changes that impact the image. | |
on: | |
push: | |
branches: | |
- "main" | |
env: | |
LANG: en_US.UTF-8 | |
WF_S2I_TOKEN: ${{ secrets.WILDFLY_S2I_BUILD_DEPLOY_TOKEN }} | |
jobs: | |
wfci: | |
name: WildFly-s2i Image Deployment on push | |
runs-on: ubuntu-latest | |
steps: | |
- id: files | |
uses: jitterbit/get-changed-files@v1 | |
- run: | | |
for changed_file in ${{ steps.files.outputs.all }}; do | |
if [[ "${changed_file}" =~ ^jboss/container/wildfly/s2i/2.0/.* ]] || [[ "${changed_file}" =~ ^jboss/container/wildfly/run/.* ]]; then | |
echo "Change detected in ${changed_file}, will deploy images." | |
echo "IMPACT_IMAGE=true" >> "$GITHUB_ENV" | |
exit 0 | |
fi | |
done | |
echo "No change detected that would impact the image, skipping the job" | |
- name: Send event to WildFly s2i repo | |
if: env.IMPACT_IMAGE == 'true' | |
run: | | |
curl \ | |
-X POST \ | |
-H "Authorization: token $WF_S2I_TOKEN" \ | |
-H "Accept: application/vnd.github.ant-man-preview+json" \ | |
-H "Content-Type: application/json" \ | |
https://api.github.com/repos/wildfly/wildfly-s2i/dispatches \ | |
--data '{"event_type": "push-in-wf-cekit-modules"}' |