Skip to content

Commit

Permalink
Update: Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
CaffeeLake committed Sep 5, 2023
1 parent 8c45d33 commit 9a5be4f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-actionlint@v1
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
cache: true

- name: Download modules
run: go mod download

- name: Coverage
run: go test -v -race -cover -coverprofile=coverage ./...

- name: Report likely mistakes
run: go vet ./...

- name: Staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest && staticcheck ./...

- name: Build
run: CGO_ENABLED=0 go build -buildmode pie

- name: Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ name: "CodeQL"
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches: [ "main" ]
branches:
- main

jobs:
analyze:
name: Analyze

runs-on: ubuntu-latest

permissions:
actions: read
contents: read
Expand All @@ -19,21 +23,18 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ["go"]

steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
7 changes: 1 addition & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,20 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

uses: actions/checkout@v4
- name: Setup Docker buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Downcase DOCKER_REPO
run: |
github_repo="${{ github.repository }}"
echo "DOCKER_REPO=${github_repo,,}" >> "${GITHUB_ENV}"
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
Expand All @@ -48,7 +44,6 @@ jobs:
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=ref,event=branch
type=sha,format=long
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
Expand Down

0 comments on commit 9a5be4f

Please sign in to comment.