reusable-app-create-manifests.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Reusable create app container image manifests workflow
  2. on:
  3. workflow_call:
  4. inputs:
  5. tags:
  6. type: string
  7. required: true
  8. registry:
  9. type: string
  10. default: 'docker.io'
  11. image-name:
  12. type: string
  13. default: growilabs/growi
  14. docker-registry-username:
  15. type: string
  16. default: growimoogle
  17. tag-temporary:
  18. type: string
  19. default: latest
  20. secrets:
  21. DOCKER_REGISTRY_PASSWORD:
  22. required: true
  23. jobs:
  24. create-manifest:
  25. runs-on: ubuntu-latest
  26. steps:
  27. - name: Docker meta for extra-images
  28. id: meta-extra-images
  29. uses: docker/metadata-action@v5
  30. with:
  31. images: ${{ inputs.registry }}/${{ inputs.image-name }}
  32. sep-tags: ','
  33. tags: |
  34. type=raw,value=${{ inputs.tag-temporary }}-amd64
  35. type=raw,value=${{ inputs.tag-temporary }}-arm64
  36. - name: Login to Container Registry
  37. uses: docker/login-action@v3
  38. with:
  39. registry: ${{ inputs.registry }}
  40. username: ${{ inputs.docker-registry-username }}
  41. password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
  42. - name: Create and push manifest images
  43. uses: Noelware/docker-manifest-action@0.4.3
  44. with:
  45. base-image: ${{ inputs.tags }}
  46. extra-images: ${{ steps.meta-extra-images.outputs.tags }}
  47. push: true