-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHA: split Tauri and Docker in two workflows (#462)
* chore: split tauri and docker image on manual trigger * chore: add version and latest as options of the trigger * chore: tauri action make draft release configurable * chore: desc
- Loading branch information
Showing
3 changed files
with
60 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
name: 🚀 Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version tag for the Docker image (optional, will use latest Git tag if empty)' | ||
required: false | ||
type: string | ||
tag_as_latest: | ||
description: 'Also tag as latest?' | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
push-docker-image: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Determine tag | ||
id: tag | ||
run: | | ||
if [ -z "${{ github.event.inputs.version }}" ]; then | ||
git fetch --all --tags | ||
TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
else | ||
TAG=${{ github.event.inputs.version }} | ||
fi | ||
echo "VERSION_TAG=$TAG" >> $GITHUB_ENV | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build & push | ||
run: | | ||
TAGS="ghcr.io/premai-io/prem-app:$VERSION_TAG" | ||
if ${{ github.event.inputs.tag_as_latest }} == 'true'; then | ||
TAGS="$TAGS,ghcr.io/premai-io/prem-app:latest" | ||
fi | ||
docker buildx build --push \ | ||
--file Dockerfile \ | ||
--tag $TAGS \ | ||
--platform linux/arm64,linux/amd64 . |
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