check_update #276
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: check_update | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
check_update: | |
name: Check updates from source | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.INTERSCRIPT_CI_PAT }} | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install sqlite3 curl make | |
- name: Fetch GeoNames last version | |
run: | | |
make data/VERSION | |
echo "GNS_VERSION=v$(cat data/VERSION)" >> $GITHUB_ENV | |
- uses: mukunku/[email protected] | |
id: checkTag | |
with: | |
tag: ${{ env.GNS_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo ${{ steps.checkTag.outputs.exists }} | |
- if: steps.checkTag.outputs.exists == 'false' | |
run: | | |
git config user.name "interscript-ci" | |
git config user.email "[email protected]" | |
git tag ${{ env.GNS_VERSION }} | |
git push origin main --tags |