reusable-app-create-manifests.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. - uses: actions/checkout@v3
  25. - name: Docker meta for extra-images
  26. id: meta-extra-images
  27. uses: docker/metadata-action@v4
  28. with:
  29. images: ${{ inputs.registry }}/${{ inputs.image-name }}
  30. sep-tags: ','
  31. tags: |
  32. type=raw,value=${{ inputs.tag-temporary }}-amd64
  33. type=raw,value=${{ inputs.tag-temporary }}-arm64
  34. - name: Login to Container Registry
  35. uses: docker/login-action@v2
  36. with:
  37. registry: ${{ inputs.registry }}
  38. username: wsmoogle
  39. password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
  40. - name: Create and push manifest images
  41. uses: Noelware/docker-manifest-action@master
  42. with:
  43. base-image: ${{ inputs.tags }}
  44. extra-images: ${{ steps.meta-extra-images.outputs.tags }}
  45. push: true