ente/.github/workflows/server-publish.yml

46 lines
1.5 KiB
YAML
Raw Normal View History

2024-03-27 06:13:19 +00:00
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'
2024-03-27 07:27:37 +00:00
#
# See server/docs/publish.md for more details.
2024-03-27 06:13:19 +00:00
workflow_dispatch:
inputs:
commit:
description: "Commit to publish the image from"
type: string
required: true
jobs:
2024-03-27 07:27:37 +00:00
publish:
2024-03-27 06:13:19 +00:00
runs-on: ubuntu-latest
steps:
2024-03-27 07:23:37 +00:00
- name: Checkout code
2024-03-27 06:13:19 +00:00
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
2024-03-27 07:23:37 +00:00
# Resultant package name will be ghcr.io/ente-io/server
image: server
2024-03-27 06:13:19 +00:00
registry: ghcr.io
enableBuildKit: true
multiPlatform: true
platform: linux/amd64,linux/arm64,linux/arm/v7
2024-03-27 07:38:27 +00:00
buildArgs: GIT_COMMIT=${{ inputs.commit }}
tags: ${{ inputs.commit }}, latest
2024-03-27 06:13:19 +00:00
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2024-05-08 06:46:53 +00:00
- name: Tag as server/ghcr
run: |
2024-05-08 06:46:53 +00:00
git tag -f server/ghcr
git push -f origin server/ghcr