-
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.
* add docker publish action * use semver tag * use semver tag * use semver tag * update image name * test string version * test using package.json version * update release action * add changeset
- Loading branch information
1 parent
2cd47c3
commit aa83a72
Showing
3 changed files
with
60 additions
and
1 deletion.
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,8 @@ | ||
--- | ||
"@gateweaver/cli": patch | ||
"@gateweaver/policies": patch | ||
"@gateweaver/server": patch | ||
"@gateweaver/utils": patch | ||
--- | ||
|
||
Publish packages |
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,46 @@ | ||
name: Publish Server Docker Image | ||
description: Create and publish Server Docker image | ||
inputs: | ||
REGISTRY: | ||
description: The registry to push the image to | ||
required: false | ||
default: ghcr.io | ||
IMAGE_NAME: | ||
description: The name of the image to push | ||
required: false | ||
default: gateweaver/server | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get server package version | ||
run: | | ||
VERSION=$(jq -r '.version' ./packages/server/package.json) | ||
echo "Server package version is $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ inputs.REGISTRY }}/${{ inputs.IMAGE_NAME }} | ||
tags: | | ||
type=semver,pattern={{version}},value=${{ env.VERSION }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
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