mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
The Docker Hub image remains under johannesjo/ to maintain existing references for users, while the GitHub repo moved to super-productivity/
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
# inspired by: https://docs.github.com/en/actions/guides/publishing-docker-images
|
|
name: Publish Docker image To hub.docker
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs: {}
|
|
|
|
jobs:
|
|
push_to_registry:
|
|
name: Push Docker image to Docker Hub
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
# work around for npm installs from git+https://github.com/johannesjo/J2M.git
|
|
- name: Reconfigure git to use HTTP authentication
|
|
run: >
|
|
git config --global url."https://github.com/".insteadOf
|
|
ssh://git@github.com/
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
# Note: Docker Hub image is under johannesjo/ (personal account) while
|
|
# the GitHub repo is under super-productivity/ org. This is intentional
|
|
# to maintain existing Docker image references for users.
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
|
|
with:
|
|
images: johannesjo/super-productivity
|
|
|
|
- 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: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: |
|
|
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
|
UNSPLASH_KEY=${{ secrets.UNSPLASH_KEY }}
|
|
UNSPLASH_CLIENT_ID=${{ secrets.UNSPLASH_CLIENT_ID }}
|
|
platforms: linux/amd64, linux/arm64
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|