Skip to content

Commit

Permalink
Fix release action & update readme (#973)
Browse files Browse the repository at this point in the history
* Fix action to update readme after release

* Stop building container images for dependabot PRs

* Update installation & compilation in readme
  • Loading branch information
der-eismann committed Apr 5, 2023
1 parent 6eea4ee commit 7232d00
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
docker_build:
runs-on: ubuntu-22.04
name: Docker Build
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'rebuy-de/aws-nuke' }}
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]')

steps:
- uses: actions/checkout@v3
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Publish release artifacts
on:
release:
types: [created]
permissions:
contents: write
pull-requests: write

jobs:
update_readme:
Expand All @@ -14,13 +17,19 @@ jobs:
with:
fetch-depth: 0
ref: main
- run: |
sed -r -i "s/aws-nuke:v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke:${GITHUB_REF#refs/tags/}/" README.md
sed -r -i "s/aws-nuke-v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke-${GITHUB_REF#refs/tags/}/" README.md
sed -r -i "s/\/v[0-9]+\.[0-9]+\.[0-9]+\//\/${GITHUB_REF#refs/tags/}\//" README.md
- uses: stefanzweifel/git-auto-commit-action@v4
- name: Update versions in readme
run: |
sed -r -i "s/aws-nuke:v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke:${{ github.ref_name }}/" README.md
sed -r -i "s/aws-nuke-v[0-9]+\.[0-9]+\.[0-9]+/aws-nuke-${{ github.ref_name }}/" README.md
sed -r -i "s/\/v[0-9]+\.[0-9]+\.[0-9]+\//\/${{ github.ref_name }}\//" README.md
- uses: peter-evans/create-pull-request@v5
name: Create Pull Request
with:
commit_message: Update readme for ${GITHUB_REF#refs/tags/}
title: Update readme for ${{ github.ref_name }} release
commit-message: Update readme for ${{ github.ref_name }} release
body: Updating version references in the readme to ${{ github.ref_name }}
branch: update-readme-${{ github.ref_name }}
delete-branch: true

release:
name: Publish binaries
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ presets:

## Install

### For Mac
### For macOS
`brew install aws-nuke`

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

Download and extract
`$ 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`
`$ 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`

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

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

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

0 comments on commit 7232d00

Please sign in to comment.