-
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: setup release-please for repo, blog docker image
* ci: add release-please * ci: fixing dockerfile ref in github action * ci: updating dependabot commit message prefix to chore: and buildblog name * ci: updating docker/build-push-action * ci: adding basic release-please config
- Loading branch information
1 parent
c7a9efc
commit 16b2c46
Showing
7 changed files
with
119 additions
and
8 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
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
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,68 @@ | ||
name: Release Please action | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release_please: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
outputs: | ||
paths_released: ${{ steps.release.outputs.paths_released }} | ||
releases_created: ${{ steps.release.outputs.releases_created }} | ||
tag_name: ${{ steps.release.outputs.tag_name }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: googleapis/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ secrets.GH_RELEASE_PLEASE_TOKEN }} | ||
config-file: release-please-config.json | ||
manifest-file: .release-please-manifest.json | ||
|
||
publish_image: | ||
if: ${{ steps.release.outputs['Home/Areas/Blogs--release_created'] }} | ||
runs-on: ubuntu-latest | ||
needs: release_please | ||
strategy: | ||
matrix: | ||
path: ${{ fromJson(needs.release_please.outputs.paths_released) }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- run: echo "BUILDCONFIG=$(jq -c . < ${{ matrix.path }}/buildconfig.json)" >> $GITHUB_ENV | ||
- run: echo '${{ fromJson(env.BUILDCONFIG).version }}' | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
hyperfluid-solutions/${{ matrix.path }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}},value=${{ fromJson(env.BUILDCONFIG).version }} | ||
type=semver,pattern={{major}}.{{minor}},value=${{ fromJson(env.BUILDCONFIG).majorminor }} | ||
type=semver,pattern={{major}},value=${{ fromJson(env.BUILDCONFIG).major }} | ||
type=sha | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: ${{ fromJson(env.PACKAGE_JSON).platforms }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,3 @@ | ||
{ | ||
"blog": "0.0.1" | ||
} |
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,6 @@ | ||
{ | ||
"version": "0.0.1", | ||
"major": "0", | ||
"majorminor": "0.0", | ||
"platforms": "linux/amd64,linux/arm64" | ||
} |
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 @@ | ||
0.0.1 |
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,26 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
"packages": { | ||
"blog": { | ||
"release-type": "simple", | ||
"initial-version": "0.0.1", | ||
"extra-files": [ | ||
{ | ||
"type": "json", | ||
"path": "buildconfig.json", | ||
"jsonpath": "$.version" | ||
}, | ||
{ | ||
"type": "json", | ||
"path": "buildconfig.json", | ||
"jsonpath": "$.major" | ||
}, | ||
{ | ||
"type": "json", | ||
"path": "buildconfig.json", | ||
"jsonpath": "$.majorminor" | ||
} | ||
] | ||
} | ||
} | ||
} |