Skip to content

add windows native titlebar tweak #3 #12

add windows native titlebar tweak #3

add windows native titlebar tweak #3 #12

Workflow file for this run

name: Publish Docker Image
on:
workflow_dispatch:
push:
branches: main
jobs:
publish:
name: Publish Docker Image to ghcr.io
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Extract version number
run: |
VERSION=$(grep -oP -m 1 '(?<=^## r)\d+' CHANGELOG.md)
if [[ $VERSION = "" ]]; then
echo "No version found in CHANGELOG.md"
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create Docker Image tags
run: |
TAGS="ghcr.io/${{ github.repository }}:dev"
if docker manifest inspect ghcr.io/${{ github.repository }}:0.0.$VERSION > /dev/null 2>&1; then
echo "Image with version (0.0.$VERSION) already exists in registry"
echo "Publishing a dev image.."
else
echo "Image with version (0.0.$VERSION) does not exist in the registry yet"
echo "Publishing a release and a dev image.."
echo "IS_RELEASE=true" >> $GITHUB_ENV
TAGS="${TAGS},\
ghcr.io/${{ github.repository }}:0.0.${{ env.VERSION }},\
ghcr.io/${{ github.repository }}:latest"
fi
echo "TAGS=${TAGS}" >> $GITHUB_ENV
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.TAGS }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Update release container on server
if: env.IS_RELEASE == 'true'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_PRIVKEY }}
# this relies on a specific custom update script that is installed on the
# server that currently hosts sheltupdate. Adjust as needed.
script: ~/update.sh sheltupdate
- name: Update staging container on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_PRIVKEY }}
script: ~/update.sh sheltupdate-staging