Skip to content

Daily CI

Daily CI #309

Workflow file for this run

name: Daily CI
on:
schedule:
- cron: '30 14 * * *'
jobs:
new-tag:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set tag
run: |
DAILY_TAG=$(date +'%Y-%m-%d')
echo "DAILY_TAG=$DAILY_TAG" >> $GITHUB_ENV
- name: Create Tag
uses: actions/github-script@v7
with:
script: |
const {DAILY_TAG} = process.env
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${DAILY_TAG}`,
sha: context.sha
})
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build geoip.dat
run: |
go run ./ -c config-ir.json
- name: Move files to publish directory
run: |
mkdir publish
mv output/dat/*.dat publish
mv output/text/*.txt publish
- name: Publish release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.DAILY_TAG }}
name: ${{ env.DAILY_TAG }}
prerelease: false
draft: false
files: "publish/*"