Skip to content

Commit

Permalink
Removing testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathbyToast committed Nov 8, 2023
1 parent f3fa6c9 commit 862c3fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/diff.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/diff_and_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ jobs:
#continue-on-error: true
id: diff-adstxt-files
# https://trstringer.com/github-actions-multiline-strings/
# Replace ads.txt with test_ads.txt on both diff calls below to get this step to fail
# `diff --suppress-common-lines <(sed 's/\r//g' <(curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt)) <(sed 's/\r//g' <(curl https://pvpivs.com/test_ads.txt))`
# diff --suppress-common-lines <(sed 's/\r//g' <(curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt)) <(sed 's/\r//g' <(curl https://pvpivs.com/test_ads.txt))
run: |
DIFF_OUT=$(cat << EOF
`diff --suppress-common-lines <(sed 's/\r//g' <(curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt)) <(sed 's/\r//g' <(curl https://pvpivs.com/test_ads.txt))`
`diff --suppress-common-lines <(sed 's/\r//g' <(curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt)) <(sed 's/\r//g' <(curl https://pvpivs.com/ads.txt))`
EOF
)
echo "DIFF_OUT<<EOF" >> $GITHUB_OUTPUT
echo "$DIFF_OUT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
diff --suppress-common-lines <(sed 's/\r//g' <(curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt)) <(sed 's/\r//g' <(curl https://pvpivs.com/test_ads.txt))
diff --suppress-common-lines <(sed 's/\r//g' <(curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt)) <(sed 's/\r//g' <(curl https://pvpivs.com/ads.txt))
- run: echo "💡 Diff completed, diff outcome is ${{ steps.diff-adstxt-files.outcome }}."
- run: echo "🍏 This job's status is ${{ job.status }}." #due to continue-on-error=true."
Update-ads-txt-after-failed-diff:
Expand All @@ -44,7 +47,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: gh-pages
repo-token: ${{ secrets.GITHUB_TOKEN }}
#repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Updated ads.txt file via curl
run: curl https://config.playwire.com/dyn_ads/1025030/74482/ads.txt > test_ads.txt
- name: Commit test_ads.txt using git commit
Expand Down

0 comments on commit 862c3fe

Please sign in to comment.