Skip to content

Commit

Permalink
test: fixed action script
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <[email protected]>
  • Loading branch information
kbdharun committed May 7, 2024
1 parent 1e800ea commit 4da2b0a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,40 @@ jobs:
run: |
bash build-pdf.sh
- name: Deploy
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check for generated files
id: check-files
run: |
echo "zip_exists=$(if [[ $(find language_archives -name '*.zip' | wc -l) -gt 0 ]]; then echo true; else echo false; fi)" >> $GITHUB_ENV
echo "pdf_exists=$(if [[ $(find scripts/pdf -name '*.pdf' | wc -l) -gt 0 ]]; then echo true; else echo false; fi)" >> $GITHUB_ENV
echo "checksums_exists=$(if [[ -f 'tldr.sha256sums' ]]; then echo true; else echo false; fi)" >> $GITHUB_ENV
- name: Construct subject-path
- name: Construct subject-path for attest action
id: construct-subject-path
run: |
subject_path=""
if [[ ${{ env.zip_exists }} == 'true' ]]; then
zip_files=$(find language_archives -name '*.zip' -printf '%p, ')
subject_path+="${zip_files::-2} " # remove trailing comma
zip_files=$(find language_archives -name '*.zip' -printf '%p,')
subject_path+="${zip_files::-1}"
fi
if [[ ${{ env.pdf_exists }} == 'true' ]]; then
if [[ -n $subject_path ]]; then subject_path+=" "; fi # add space if not the first path
pdf_files=$(find scripts/pdf -name '*.pdf' -printf '%p, ')
subject_path+="${pdf_files::-2}" # remove trailing comma
if [[ -n $subject_path ]]; then subject_path+=","; fi
pdf_files=$(find scripts/pdf -name '*.pdf' -printf '%p,')
subject_path+="${pdf_files::-1}"
fi
if [[ ${{ env.checksums_exists }} == 'true' ]]; then
if [[ -n $subject_path ]]; then subject_path+=","; fi
subject_path+='tldr.sha256sums'
fi
echo "subject_path=$subject_path" >> $GITHUB_ENV
- name: Attest generated files
uses: actions/attest-build-provenance@v1
continue-on-error: true
continue-on-error: true # prevent failing when no pages are modified
with:
subject-path: ${{ env.subject_path }}

- name: Deploy
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion pages.hi/common/7z.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- किसी नए या मौजूदा संग्रह में एक फ़ाइल या निर्देशिका जोड़ें:

`7z a {{संग्रह.7z/का/पथ}} {{फ़ाइल_या_निर्देशिका/का/पथ}}`
`7z a {{संग्रह.7z/का/ पथ}} {{फ़ाइल_या_निर्देशिका/का/पथ}}`

- किसी मौजूदा संग्रह को एन्क्रिप्ट करें (फ़ाइल नाम सहित):

Expand Down
2 changes: 1 addition & 1 deletion pages.ta/android/am.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- ஒரு குறிப்பிட்ட செயல்பாட்டைத் தொடங்கவும்:

`am start -n {{com.android.settings/.Settings}}`
`am start -n {{com.android.setti ngs/.Settings}}`

- ஒரு செயல்பாட்டைத் தொடங்கி, அதற்குத் தரவை அனுப்பவும்:

Expand Down

0 comments on commit 4da2b0a

Please sign in to comment.