45 lines
1.5 KiB
YAML
45 lines
1.5 KiB
YAML
name: "Publish (server)"
|
|
|
|
on:
|
|
# Run manually, providing it the commit.
|
|
#
|
|
# To obtain the commit from the currently deployed museum, do:
|
|
# curl -s https://api.ente.io/ping | jq -r '.id'
|
|
#
|
|
# See server/docs/publish.md for more details.
|
|
workflow_dispatch:
|
|
inputs:
|
|
commit:
|
|
description: "Commit to publish the image from"
|
|
type: string
|
|
required: true
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.commit }}
|
|
|
|
- name: Build and push
|
|
uses: mr-smithers-excellent/docker-build-push@v6
|
|
with:
|
|
dockerfile: server/Dockerfile
|
|
directory: server
|
|
# Resultant package name will be ghcr.io/ente-io/server
|
|
image: server
|
|
registry: ghcr.io
|
|
enableBuildKit: true
|
|
multiPlatform: true
|
|
platform: linux/amd64,linux/arm64,linux/arm/v7
|
|
buildArgs: GIT_COMMIT=${{ inputs.commit }}
|
|
tags: ${{ inputs.commit }}, latest
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Tag as server/ghcr
|
|
run: |
|
|
git tag -f server/ghcr
|
|
git push -f origin server/ghcr
|