Go #1919
This file contains hidden or 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: Go | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '0 5 * * *' | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.18 | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Test | |
| run: go test -v | |
| update: | |
| name: Update embedded DB | |
| needs: test | |
| if: ${{ failure() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.18 | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Get package | |
| run: go get github.com/n0madic/macvendor | |
| - name: Generate DB | |
| run: go run cmd/generatedb/generatedb.go | |
| - name: Commit updated DB | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| author_name: Nomadic | |
| author_email: nomadic.ua@gmail.com | |
| message: "Update embedded DB" | |
| add: "embedb.bin.gz" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |