Skip to content

Commit

Permalink
support cached pkglint build
Browse files Browse the repository at this point in the history
  • Loading branch information
jperkin committed Jul 16, 2024
1 parent e0c6389 commit db629f8
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/pkglint.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
name: Verify pkglint
on: [push]
env:
PKGLINT_VERSION: v23.4.2
jobs:
pkglint:
runs-on: ubuntu-latest
steps:
- name: Checkout pkgsrc
uses: actions/checkout@v4

- name: Checkout pkglint
- name: Look for cached build of pkglint ${{ env.PKGLINT_VERSION }}
id: pkglint-artifact
uses: LIT-Protocol/artifact-exists-action@v0
with:
name: pkglint-${{ env.PKGLINT_VERSION }}

- name: Download cached build of pkglint ${{ env.PKGLINT_VERSION }}
if: steps.pkglint-artifact.outputs.exists == 'true'
uses: actions/download-artifact@v4
with:
name: pkglint-${{ env.PKGLINT_VERSION }}

- name: Checkout pkglint ${{ env.PKGLINT_VERSION }}
if: steps.pkglint-artifact.outputs.exists == 'false'
uses: actions/checkout@v4
with:
repository: rillig/pkglint
path: pkglint
ref: ${{ env.PKGLINT_VERSION }}

- name: Build latest pkglint
- name: Build pkglint ${{ env.PKGLINT_VERSION }}
if: steps.pkglint-artifact.outputs.exists == 'false'
run: |
cd pkglint/v23
go install -v ./...
- name: Save pkglint artifact
if: steps.pkglint-artifact.outputs.exists == 'false'
uses: actions/upload-artifact@v4
with:
name: pkglint-${{ env.PKGLINT_VERSION }}
path: |
~/go/bin/
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
Expand Down

0 comments on commit db629f8

Please sign in to comment.