Scrape #93
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: Scrape | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
scrape: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "^1.19" | |
- name: Scrape | |
id: scrape | |
run: | | |
FIREFOX_BIN=/usr/bin/firefox \ | |
GECKODRIVER_BIN=/usr/bin/geckodriver \ | |
go run . | |
- name: Check for existing tag | |
uses: mukunku/[email protected] | |
id: check-tag | |
with: | |
tag: ${{ steps.scrape.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
if: ${{ steps.check-tag.outputs.exists == 'false' }} | |
with: | |
artifacts: ${{ steps.scrape.outputs.path }} | |
artifactErrorsFailBuild: true | |
tag: ${{ steps.scrape.outputs.version }} |