diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bbd7a24..e46e518 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Login to Docker Hub @@ -40,7 +40,7 @@ jobs: needs: build steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Run deploy script diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index af860d4..8ba0c0c 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1 +1,43 @@ -# TODO: implement pull request workflow +name: Pull Request +on: + pull_request: + branches: + - main +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: '1.25' + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest + build: + name: Build server + runs-on: ubuntu-24.04-arm + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: '1.25' + - name: Download dependencies + run: go mod download + - name: Build application + run: CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/web/main.go + docker: + name: Build Docker image + runs-on: ubuntu-24.04-arm + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Build Docker image + run: docker build -t links.stevanfreeborn.com . +