* ci: update workflow triggers for linting and building to include specific paths * ci: rename workflow to clarify purpose as App-Service Build test * chore(ci): specify the path context when building for appservice --------- Co-authored-by: dkeven <dkvvven@gmail.com>
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
name: Publish image-service to Dockerhub
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tags:
|
|
description: 'Release Tags'
|
|
|
|
jobs:
|
|
publish_dockerhub_amd64:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
|
- name: Build and push amd64 Docker image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
tags: beclab/image-service:${{ github.event.inputs.tags }}-amd64
|
|
context: framework/app-service
|
|
file: framework/app-service/Dockerfile.image
|
|
platforms: linux/amd64
|
|
publish_dockerhub_arm64:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
|
- name: Build and push arm64 Docker image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
tags: beclab/image-service:${{ github.event.inputs.tags }}-arm64
|
|
context: framework/app-service
|
|
file: framework/app-service/Dockerfile.image
|
|
platforms: linux/arm64
|
|
|
|
publish_manifest:
|
|
needs:
|
|
- publish_dockerhub_amd64
|
|
- publish_dockerhub_arm64
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
|
|
|
- name: Push manifest
|
|
run: |
|
|
docker manifest create beclab/image-service:${{ github.event.inputs.tags }} --amend beclab/image-service:${{ github.event.inputs.tags }}-amd64 --amend beclab/image-service:${{ github.event.inputs.tags }}-arm64
|
|
docker manifest push beclab/image-service:${{ github.event.inputs.tags }}
|
|
|