Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:


env:
GO_VERSION: '1.24'

GO_VERSION: '1.26.2'
jobs:
build-and-release:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ permissions:
packages: write

env:
GO_VERSION: '1.26'
GO_VERSION: '1.26.2'

concurrency:
group: "pull_request_${{ github.event.pull_request.number }}"
cancel-in-progress: true

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GO_VERSION: '1.26'
GO_VERSION: '1.26.2'
UPX_VERSION: "5.1.0"
SVU_VERSION: "3.3.0"

Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

- uses: actions/setup-go@v6
with:
go-version: "1.22"
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: Set up QEMU
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:


env:
GO_VERSION: '1.26'
GO_VERSION: '1.26'

concurrency:
group: "branch_tests_${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
Expand Down
18 changes: 17 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
version: "2"

linters:
default: all
default: none
enable:
- err113
- errcheck
- govet
- ineffassign
- staticcheck
- unconvert
- unused
- wrapcheck
- cyclop
- gosec
- noctx
- prealloc
- revive
- noinlineerr
- gocritic
exclusions:
paths:
- "_test.go"
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) karl-cardenas-coding
# SPDX-License-Identifier: MIT

FROM golang:1.26.0-alpine3.22 AS builder
FROM golang:1.26.2-alpine3.23 AS builder

LABEL org.opencontainers.image.source="http://github.com/karl-cardenas-coding/go-lambda-cleanup"
LABEL org.opencontainers.image.description="A solution for removing previous versions of AWS Lambdas"
Expand All @@ -13,13 +13,12 @@ RUN cd /source && \
adduser -H -u 1002 -D appuser appuser && \
go build -ldflags="-X 'github.com/karl-cardenas-coding/go-lambda-cleanup/v2/cmd.VersionString=${VERSION}'" -o glc -v

FROM alpine:latest
FROM dhi.io/alpine-base:3.23

COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
COPY --from=builder --chown=appuser:appuser /source/glc /usr/bin/

RUN apk -U upgrade --no-cache
USER appuser

ENTRYPOINT ["/usr/bin/glc"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
go-lambda-cleanup is distributed as a single binary. [Download](https://github.com/karl-cardenas-coding/go-lambda-cleanup/releases) the binary and install go-lambda-cleanup in a directory in your system's [PATH](https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them). `/usr/local/bin` is the recommended path for UNIX/LINUX environments.

```shell
VERSION=2.0.19
VERSION=2.0.20
wget https://github.com/karl-cardenas-coding/go-lambda-cleanup/releases/download/v$VERSION/go-lambda-cleanup-v$VERSION-linux-amd64.zip
unzip go-lambda-cleanup-v$VERSION-linux-amd64.zip
sudo mv glc /usr/local/bin/
Expand Down Expand Up @@ -300,7 +300,7 @@ on:
# At 04:00 on every day
- cron: '0 04 * * *'
env:
VERSION: 'v2.0.19'
VERSION: 'v2.0.20'

jobs:
build:
Expand Down
10 changes: 10 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ tasks:
desc: Check for nil errors
cmds:
- ~/go/bin/nilaway ./...

docker-build:
desc: Build the Docker image
cmds:
- docker build -t go-lambda-cleanup:latest .

fmt:
desc: Format the code
cmds:
- go fmt ./...
Loading
Loading