-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): generate release from github action and update changelog
- Loading branch information
Showing
3 changed files
with
82 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
TEST_TAG: ghcr.io/immobiliare/peephole:test | ||
LATEST_TAG: ghcr.io/immobiliare/peephole:latest | ||
NEW_TAG: ghcr.io/immobiliare/peephole:${{ github.event.release.tag_name }} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_SRE_TOKEN }} | ||
- name: Build and export to Docker | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
load: true | ||
tags: ${{ env.TEST_TAG }} | ||
- name: Test Docker Image | ||
run: | | ||
docker run --rm ${{ env.TEST_TAG }} | ||
- name: Build and push Docker Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
tags: ${{ env.NEW_TAG }}, ${{ env.LATEST_TAG }} | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Create release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
changelog: | ||
name: Create changelog | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Conventional Changelog Action | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v5 | ||
with: | ||
preset: conventionalcommits | ||
github-token: ${{ secrets.GH_SRE_TOKEN }} | ||
git-user-name: ${{ github.actor }} | ||
git-user-email: ${{ github.actor }}@users.noreply.github.com | ||
tag-prefix: '' | ||
input-file: '.github/CHANGELOG.md' | ||
output-file: '.github/CHANGELOG.md' | ||
release-count: 10000 | ||
skip-on-empty: false | ||
skip-version-file: true | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
with: | ||
tag_name: ${{ steps.changelog.outputs.tag }} | ||
body: ${{ steps.changelog.outputs.clean_changelog }} | ||
token: ${{ secrets.GH_SRE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters