add publishing self hosting image

This commit is contained in:
Karol Sójko
2023-02-06 13:49:18 +01:00
parent 4586308210
commit 08c1328932
2 changed files with 56 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
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:
publish:
runs-on: ubuntu-latest
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 }}
@@ -211,10 +211,17 @@ jobs:
workspace_name: ${{ inputs.workspace_name }}
secrets: inherit
publish-self-hosting:
needs: [ build, test, lint, e2e ]
name: Publish Self Hosting Docker Image
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
secrets: inherit
deploy-web:
if: ${{ inputs.deploy_web }}
needs: publish
needs: [ publish, publish-self-hosting ]
name: Deploy Web
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
@@ -226,7 +233,7 @@ jobs:
deploy-worker:
if: ${{ inputs.deploy_worker }}
needs: publish
needs: [ publish, publish-self-hosting ]
name: Deploy Worker
uses: standardnotes/server/.github/workflows/common-deploy.yml@main