Skip to content

Commit 4ef5158

Browse files
committed
Rebrand and Updates (#7)
* rebrand and update content accordingly for the fork * add config for renovate * remove old files * rework tests and release workflows, sign all builds
1 parent 3d53872 commit 4ef5158

13 files changed

+210
-371
lines changed

.github/CODEOWNERS

-1
This file was deleted.

.github/renovate.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"extends": [
3+
"config:base"
4+
],
5+
"packageRules": [
6+
{
7+
"matchManagers": [
8+
"dockerfile"
9+
],
10+
"matchUpdateTypes": [
11+
"pin",
12+
"digest"
13+
],
14+
"automerge": true
15+
},
16+
{
17+
"matchPackagePatterns": [
18+
"^golang.*"
19+
],
20+
"groupName": "golang",
21+
"groupSlug": "golang"
22+
}
23+
],
24+
"regexManagers": [
25+
{
26+
"fileMatch": [
27+
"^.github/workflows/.*"
28+
],
29+
"matchStrings": [
30+
"go-version: (?<currentValue>.*?)\n"
31+
],
32+
"depNameTemplate": "golang",
33+
"datasourceTemplate": "docker"
34+
}
35+
]
36+
}

.github/workflows/ci.yaml

-84
This file was deleted.

.github/workflows/golang.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: golang
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "15 3 * * 0"
12+
13+
jobs:
14+
build:
15+
name: Test and Build
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Setup Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.17
22+
- name: Setup tools
23+
run: |
24+
go get golang.org/x/lint/golint
25+
- name: Checkout code
26+
uses: actions/checkout@v2
27+
- name: Test Project
28+
run: |
29+
make test
30+
- name: Build Project
31+
run: |
32+
make

.github/workflows/release.yaml

+23-97
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,30 @@
1-
name: Publish release artifacts
1+
name: release
22

33
on:
4-
release:
5-
types: [created]
4+
push:
5+
tags:
6+
- "v*"
7+
68
permissions:
79
contents: write
8-
pull-requests: write
910

1011
jobs:
11-
update_readme:
12-
name: Update Readme
13-
runs-on: ubuntu-22.04
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
19-
ref: main
20-
- name: Update versions in readme
21-
run: |
22-
sed -r -i "s/aws-nuke:v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke:${{ github.ref_name }}/" README.md
23-
sed -r -i "s/aws-nuke-v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke-${{ github.ref_name }}/" README.md
24-
sed -r -i "s/\/v[0-9]+\.[0-9]+\.[0-9]+\//\/${{ github.ref_name }}\//" README.md
25-
- uses: peter-evans/create-pull-request@v5
26-
name: Create Pull Request
27-
with:
28-
title: Update readme for ${{ github.ref_name }} release
29-
commit-message: Update readme for ${{ github.ref_name }} release
30-
body: Updating version references in the readme to ${{ github.ref_name }}
31-
branch: update-readme-${{ github.ref_name }}
32-
delete-branch: true
33-
34-
release:
35-
name: Publish binaries
36-
runs-on: ubuntu-22.04
37-
steps:
38-
- name: Setup Go
39-
uses: actions/setup-go@v3
40-
with:
41-
go-version: '1.20'
42-
- name: Checkout code
43-
uses: actions/checkout@v3
44-
with:
45-
fetch-depth: 0
46-
- name: Build Project binaries
47-
env:
48-
CGO_ENABLED: 0
49-
run: |
50-
make xc
51-
- name: Upload binaries to release
52-
uses: svenstaro/upload-release-action@v2
53-
with:
54-
repo_token: ${{ secrets.GITHUB_TOKEN }}
55-
file: dist/aws*
56-
tag: ${{ github.ref }}
57-
overwrite: true
58-
file_glob: true
59-
60-
docker_build:
61-
runs-on: ubuntu-22.04
62-
name: Docker Build
63-
12+
goreleaser:
13+
runs-on: ubuntu-latest
6414
steps:
65-
- uses: actions/checkout@v3
66-
with:
67-
fetch-depth: 0
68-
69-
- name: Generate image tags
70-
shell: bash
71-
run: echo "tags=quay.io/rebuy/aws-nuke:${GITHUB_REF#refs/tags/},docker.io/rebuy/aws-nuke:${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
72-
id: generate_tags
73-
74-
- name: Set up QEMU
75-
id: qemu
76-
uses: docker/setup-qemu-action@v2
77-
with:
78-
platforms: arm64
79-
80-
- name: Set up Docker Buildx
81-
uses: docker/setup-buildx-action@v2
82-
with:
83-
install: true
84-
85-
- name: Login to Docker Hub
86-
uses: docker/login-action@v2
87-
with:
88-
username: ${{ secrets.DOCKER_USERNAME }}
89-
password: ${{ secrets.DOCKER_PASSWORD }}
90-
91-
- name: Login to Quay.io
92-
uses: docker/login-action@v2
93-
with:
94-
registry: quay.io
95-
username: ${{ secrets.QUAY_USERNAME }}
96-
password: ${{ secrets.QUAY_PASSWORD }}
97-
98-
- name: Build and push
99-
uses: docker/build-push-action@v3
100-
with:
101-
context: .
102-
push: true
103-
tags: ${{ steps.generate_tags.outputs.tags }}
104-
platforms: linux/amd64,linux/arm64
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: 1.17
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v2
25+
with:
26+
distribution: goreleaser
27+
version: latest
28+
args: release --rm-dist
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.RELEASES_GITHUB_TOKEN }}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
/releases
66
/mocks
77
.envrc
8-
config.yaml
8+
config.yaml
9+
cosign.key

0 commit comments

Comments
 (0)