diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b0a82b4a2045e..f424a1a792f7da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,10 +55,54 @@ jobs: echo "Next" ls -ls scripts/pdf - - uses: actions/attest-build-provenance@v1 + - name: Check if Zip files exist + id: check-zip + run: | + if [[ $(find language_archives -name "*.zip" | wc -l) -gt 0 ]]; then + echo "::set-output name=exists::true" + else + echo "::set-output name=exists::false" + fi + shell: bash + + - name: Attest Zip files + if: steps.check-zip.outputs.exists == 'true' + uses: actions/attest-build-provenance@v1 with: subject-path: 'language_archives/**/*.zip' + - name: Check if PDF files exist + id: check-pdf + run: | + if [[ $(find scripts/pdf -name "*.pdf" | wc -l) -gt 0 ]]; then + echo "::set-output name=exists::true" + else + echo "::set-output name=exists::false" + fi + shell: bash + + - name: Attest PDF files + if: steps.check-pdf.outputs.exists == 'true' + uses: actions/attest-build-provenance@v1 + with: + subject-path: 'scripts/pdf/**/*.pdf' + + - name: Check if Checksums file exists + id: check-checksums + run: | + if [[ -f "tldr.sha256sums" ]]; then + echo "::set-output name=exists::true" + else + echo "::set-output name=exists::false" + fi + shell: bash + + - name: Attest Checksums file + if: steps.check-checksums.outputs.exists == 'true' + uses: actions/attest-build-provenance@v1 + with: + subject-path: 'tldr.sha256sums' + - name: Deploy run: bash scripts/deploy.sh env: