standardnotes-server/.github/workflows/common-self-hosting.yml
2023-02-06 15:34:26 +01:00

54 lines
1.2 KiB
YAML

name: Reusable Publish Docker Self Hosting Image Workflow
on:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
e2e:
name: E2E
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
secrets: inherit
publish:
runs-on: ubuntu-latest
needs: e2e
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
standardnotes/server:latest
standardnotes/server:${{ github.sha }}