reusable-app-create-manifests.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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: weseek/growi
  14. tag-temporary:
  15. type: string
  16. default: latest
  17. secrets:
  18. DOCKER_REGISTRY_PASSWORD:
  19. required: true
  20. jobs:
  21. create-manifest:
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Docker meta for extra-images
  25. id: meta-extra-images
  26. uses: docker/metadata-action@v5
  27. with:
  28. images: ${{ inputs.registry }}/${{ inputs.image-name }}
  29. sep-tags: ','
  30. tags: |
  31. type=raw,value=${{ inputs.tag-temporary }}-amd64
  32. type=raw,value=${{ inputs.tag-temporary }}-arm64
  33. - name: Login to Container Registry
  34. uses: docker/login-action@v3
  35. with:
  36. registry: ${{ inputs.registry }}
  37. username: wsmoogle
  38. password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
  39. - name: Create and push manifest images
  40. uses: Noelware/docker-manifest-action@master
  41. with:
  42. base-image: ${{ inputs.tags }}
  43. extra-images: ${{ steps.meta-extra-images.outputs.tags }}
  44. push: true