Skip to content

Commit

Permalink
chore(deps): update golangci/golangci-lint docker tag to v1.60 (#163)
Browse files Browse the repository at this point in the history
* chore(deps): update golangci/golangci-lint docker tag to v1.60

* wip: 🔕 temporary commit

* wip: 🔕 temporary commit

* wip: 🔕 temporary commit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com>
  • Loading branch information
renovate[bot] and tarampampam authored Aug 21, 2024
1 parent b9f9dfa commit 10acb9d
Show file tree
Hide file tree
Showing 25 changed files with 152 additions and 374 deletions.
26 changes: 0 additions & 26 deletions .codecov.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[{*.yml,*.yaml}]
ij_any_spaces_within_braces = false
ij_any_spaces_within_brackets = false

[{Makefile,go.mod,*.go}]
indent_style = tab
13 changes: 13 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-release-config.json
# docs: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
categories:
- title: 🛠 Fixes
labels: [type:fix, type:bug]
- title: 🚀 Features
labels: [type:feature, type:feature_request]
- title: 📦 Dependency updates
labels: [dependencies]
- title: Other Changes
labels: ['*']
10 changes: 6 additions & 4 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: dependabot
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🤖 Dependabot

on:
pull_request: {}
Expand All @@ -9,17 +12,16 @@ permissions:

jobs:
dependabot: # https://tinyurl.com/e69djmen
name: Enable auto-merge for Dependabot PRs
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: dependabot/fetch-metadata@v2
id: metadata
with: {github-token: "${{ secrets.GITHUB_TOKEN }}"}

- name: Enable auto-merge for Dependabot PRs
if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
- if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
run: gh pr merge --auto --merge "$PR_URL"
continue-on-error: true
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: documentation
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 📚 Documentation

on:
push:
Expand All @@ -12,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: peter-evans/dockerhub-description@v4 # Action page: <https://github.com/peter-evans/dockerhub-description>
- uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_USER_PASSWORD }}
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: release
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🚀 Release

on:
release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
Expand All @@ -20,24 +23,16 @@ jobs:
arch: 386
steps:
- uses: actions/checkout@v4

- uses: gacts/setup-go-with-cache@v1
with: {go-version-file: go.mod}

- {uses: actions/setup-go@v5, with: {go-version-file: go.mod}}
- {uses: gacts/github-slug@v1, id: slug}

- name: Generate builder values
id: values
- id: values
run: echo "binary-name=tinifier-${{ matrix.os }}-${{ matrix.arch }}`[ ${{ matrix.os }} = 'windows' ] && echo '.exe'`" >> $GITHUB_OUTPUT

- name: Build application
env:
- env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 0
LDFLAGS: -s -w -X gh.tarampamp.am/tinifier/v4/internal/version.version=${{ steps.slug.outputs.version }}
run: go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/tinifier/

- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -50,24 +45,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- {uses: gacts/github-slug@v1, id: slug}

- uses: docker/setup-qemu-action@v3

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -93,11 +82,8 @@ jobs:
- https://goproxy.dev
steps:
- uses: actions/setup-go@v5

- {uses: gacts/github-slug@v1, id: slug}

- run: go mod init example

- name: Get the module using proxy
env: {GOPROXY: '${{ matrix.proxy }}'}
run: go get -v -x -u "gh.tarampamp.am/tinifier/v4@${{ steps.slug.outputs.tag-name }}"
52 changes: 14 additions & 38 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: tests
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🧪 Tests

on:
push:
Expand All @@ -14,43 +17,27 @@ concurrency:

jobs:
gitleaks:
name: Gitleaks
name: Check for GitLeaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}

- {uses: actions/checkout@v4, with: {fetch-depth: 0}}
- uses: gacts/gitleaks@v1

golangci-lint:
name: Golang-CI (lint)
name: Run golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: gacts/setup-go-with-cache@v1

- uses: golangci/golangci-lint-action@v6 # Action page: <https://github.com/golangci/golangci-lint-action>
with: {skip-pkg-cache: true, skip-build-cache: true}
- {uses: actions/setup-go@v5, with: {go-version-file: go.mod}}
- uses: golangci/golangci-lint-action@v6

go-test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 2} # Fixes codecov error 'Issue detecting commit SHA'

- uses: gacts/setup-go-with-cache@v1
with: {go-version-file: go.mod}

- run: go test -race -covermode=atomic -coverprofile /tmp/coverage.txt ./...

- continue-on-error: true
uses: codecov/codecov-action@v4 # https://github.com/codecov/codecov-action
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: /tmp/coverage.txt
fail_ci_if_error: false
- {uses: actions/setup-go@v5, with: {go-version-file: go.mod}}
- run: go test -race ./...

build:
name: Build for ${{ matrix.os }} (${{ matrix.arch }})
Expand All @@ -66,24 +53,17 @@ jobs:
needs: [golangci-lint, go-test]
steps:
- uses: actions/checkout@v4

- uses: gacts/setup-go-with-cache@v1
with: {go-version-file: go.mod}

- {uses: actions/setup-go@v5, with: {go-version-file: go.mod}}
- {uses: gacts/github-slug@v1, id: slug}

- name: Build application
env:
- env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 0
LDFLAGS: -s -w -X gh.tarampamp.am/tinifier/v4/internal/version.version=${{ steps.slug.outputs.branch-name-slug }}@${{ steps.slug.outputs.commit-hash-short }}
run: go build -trimpath -ldflags "$LDFLAGS" -o /tmp/tinifier ./cmd/tinifier/

- name: Try to execute
if: matrix.os == 'linux'
run: /tmp/tinifier --version && /tmp/tinifier -h

- uses: actions/upload-artifact@v4
with:
name: tinifier-${{ matrix.os }}-${{ matrix.arch }}
Expand All @@ -97,14 +77,10 @@ jobs:
needs: [golangci-lint, go-test]
steps:
- uses: actions/checkout@v4

- {uses: gacts/github-slug@v1, id: slug}

- name: Build image
- name: Build the image
run: docker build -t tinifier:local --build-arg "APP_VERSION=${{ steps.slug.outputs.branch-name-slug }}@${{ steps.slug.outputs.commit-hash-short }}" -f ./Dockerfile .

- run: docker run --rm tinifier:local --version

- uses: anchore/scan-action@v4 # action page: <https://github.com/anchore/scan-action>
with:
image: tinifier:local
Expand Down
Loading

0 comments on commit 10acb9d

Please sign in to comment.