chore: add appflowy indexer service image to docker publish (#583)
This commit is contained in:
parent
d3e59fa801
commit
219d84af69
|
|
@ -237,6 +237,7 @@ jobs:
|
||||||
- name: Logout from Docker Hub
|
- name: Logout from Docker Hub
|
||||||
if: always()
|
if: always()
|
||||||
run: docker logout
|
run: docker logout
|
||||||
|
|
||||||
appflowy_history_image:
|
appflowy_history_image:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
|
|
@ -303,6 +304,103 @@ jobs:
|
||||||
job:
|
job:
|
||||||
- { image_name: "appflowy_history" }
|
- { image_name: "appflowy_history" }
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get git tag
|
||||||
|
id: vars
|
||||||
|
run: |
|
||||||
|
T=${GITHUB_REF#refs/*/} # Remove "refs/*/" prefix from GITHUB_REF
|
||||||
|
echo "GIT_TAG=$T" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create and push manifest for ${{ matrix.job.image_name }}:version
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
inputs: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.job.image_name }}:${{ env.GIT_TAG }}
|
||||||
|
images: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.job.image_name }}:${{ env.GIT_TAG }}-amd64,${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.job.image_name }}:${{ env.GIT_TAG }}-arm64v8
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Create and push manifest for ${{ matrix.job.image_name }}:latest
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
inputs: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.job.image_name }}:${{ env.LATEST_TAG }}
|
||||||
|
images: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.job.image_name }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.job.image_name }}:${{ env.LATEST_TAG }}-arm64v8
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Logout from Docker Hub
|
||||||
|
if: always()
|
||||||
|
run: docker logout
|
||||||
|
|
||||||
|
appflowy_indexer_image:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: ${{ secrets.DOCKER_HUB_USERNAME }}/appflowy_indexer
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
job:
|
||||||
|
- { name: "amd64", docker_platform: "linux/amd64" }
|
||||||
|
- { name: "arm64v8", docker_platform: "linux/arm64" }
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get git tag
|
||||||
|
id: vars
|
||||||
|
run: |
|
||||||
|
T=${GITHUB_REF#refs/*/} # Remove "refs/*/" prefix from GITHUB_REF
|
||||||
|
echo "GIT_TAG=$T" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Extract metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: registry.hub.docker.com/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
- name: Build and push ${{ matrix.job.image_name }}:${{ env.GIT_TAG }}
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
platforms: ${{ matrix.job.docker_platform }}
|
||||||
|
file: ./services/appflowy-indexer/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }}
|
||||||
|
${{ env.IMAGE_NAME }}:${{ env.GIT_TAG }}-${{ matrix.job.name }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
provenance: false
|
||||||
|
|
||||||
|
- name: Logout from Docker Hub
|
||||||
|
if: always()
|
||||||
|
run: docker logout
|
||||||
|
|
||||||
|
appflowy_indexer_manifest:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs: [ appflowy_indexer_image ]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
job:
|
||||||
|
- { image_name: "appflowy_indexer" }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue