Delete usha_authorized_keys #102
Workflow file for this run
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: Backup-a-saurus | |
on: | |
pull_request: | |
types: [ closed ] | |
jobs: | |
check-gpg-changed: | |
runs-on: ubuntu-latest | |
outputs: | |
gpg_modified: ${{ steps.modified_dirs.outputs.gpg_modified }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: check modified directories | |
id: modified_dirs | |
run: | | |
CMD="git diff --name-only HEAD^ HEAD" | |
echo "Modified files:" | |
$CMD | |
# Check if gpg dir has been modified | |
MODIFIED=$($CMD gpg) | |
if [[ -n "${MODIFIED}" ]]; then | |
echo "Trigger docker build" | |
echo "::set-output name=gpg_modified::true" | |
else | |
echo "::set-output name=gpg_modified::false" | |
fi | |
trigger-rebuild: #Triggers a rebuild of the backup a saurus | |
runs-on: ubuntu-latest | |
needs: check-gpg-changed | |
if: github.event.pull_request.merged == true && needs.check-gpg-changed.outputs.gpg_modified == 'true' | |
steps: | |
- name: Backup-a-saurus workflow | |
run: | | |
curl \ | |
-X POST \ | |
-H "Accept: application/vnd.github.+json" \ | |
-H "Authorization: Bearer ${{secrets.SPRINGLOAD_PAT}}" \ | |
https://api.github.com/repos/springload/backup-a-saurus/dispatches \ | |
-d '{"event_type": "trigger-rebuild"}' |