Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 7232d00

Browse files
authored
Fix release action & update readme (#973)
* Fix action to update readme after release * Stop building container images for dependabot PRs * Update installation & compilation in readme
1 parent 6eea4ee commit 7232d00

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
docker_build:
3333
runs-on: ubuntu-22.04
3434
name: Docker Build
35-
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'rebuy-de/aws-nuke' }}
35+
if: github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == 'rebuy-de/aws-nuke' && github.event.pull_request.user.login != 'dependabot[bot]')
3636

3737
steps:
3838
- uses: actions/checkout@v3

.github/workflows/release.yaml

+15-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Publish release artifacts
33
on:
44
release:
55
types: [created]
6+
permissions:
7+
contents: write
8+
pull-requests: write
69

710
jobs:
811
update_readme:
@@ -14,13 +17,19 @@ jobs:
1417
with:
1518
fetch-depth: 0
1619
ref: main
17-
- run: |
18-
sed -r -i "s/aws-nuke:v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke:${GITHUB_REF#refs/tags/}/" README.md
19-
sed -r -i "s/aws-nuke-v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke-${GITHUB_REF#refs/tags/}/" README.md
20-
sed -r -i "s/\/v[0-9]+\.[0-9]+\.[0-9]+\//\/${GITHUB_REF#refs/tags/}\//" README.md
21-
- uses: stefanzweifel/git-auto-commit-action@v4
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
2227
with:
23-
commit_message: Update readme for ${GITHUB_REF#refs/tags/}
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
2433

2534
release:
2635
name: Publish binaries

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ presets:
601601

602602
## Install
603603

604-
### For Mac
604+
### For macOS
605605
`brew install aws-nuke`
606606

607607
### Use Released Binaries
@@ -612,7 +612,7 @@ The easiest way of installing it, is to download the latest
612612
#### Example for Linux Intel/AMD
613613

614614
Download and extract
615-
`$ wget -c https://github.com/rebuy-de/aws-nuke/releases/download/v2.16.0/aws-nuke-v2.16.0-linux-amd64.tar.gz -O - | sudo tar -xz -C $HOME/bin`
615+
`$ wget -c https://github.com/rebuy-de/aws-nuke/releases/download/v2.16.0/aws-nuke-v2.16.0-linux-amd64.tar.gz -O - | tar -xz -C $HOME/bin`
616616

617617
Run
618618
`$ aws-nuke-v2.16.0-linux-amd64`
@@ -623,8 +623,7 @@ To compile *aws-nuke* from source you need a working
623623
[Golang](https://golang.org/doc/install) development environment. The sources
624624
must be cloned to `$GOPATH/src/github.com/rebuy-de/aws-nuke`.
625625

626-
Also you need to install [Glide](https://glide.sh/),
627-
[golint](https://github.com/golang/lint/) and [GNU
626+
Also you need to install [golint](https://github.com/golang/lint/) and [GNU
628627
Make](https://www.gnu.org/software/make/).
629628

630629
Then you just need to run `make build` to compile a binary into the project

0 commit comments

Comments
 (0)