Static-web-apps-deploy is adding 45 seconds to every build
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
It's not so much a problem more an annoyence. The wizard in the Azure portal allows us to setup this workflow to auto publish static web apps from github. It creates a workflow and all is great.
But the used [action](https://github.com/Azure/static-web-apps-deploy) builds the used docker container on every run. That means every time someone uses this workflow it addes 45 seconds of their github build minutes. This is bad for developers (build takes longer) and even bad for the environment (all those seconds of compute add up!)

**Describe the solution you'd like**
It's possible to have the action use a pre-build image, that would only require pulling the correct image instead of creating a new image every time it's run.
Steps required:
1. Create a github workflow in the [action repo](https://github.com/Azure/static-web-apps-deploy) to build and publish the container image to some public repository (like github container registry to keep the github actions in that platform)
2. Change the `image: "Dockerfile"` to `docker://ghcr.io/azure/static-web-apps-deploy:latest` on [this line](https://github.com/Azure/static-web-apps-deploy/blob/5c50db0011c6423f073843e7e22c3d0cb6c53920/action.yml#L60)
3. Enjoy faster build times and output just a little bit less of CO2 on every build (since all builds will be faster)
4. Maybe trigger the workflow everytime the `mcr.microsoft.com/appsvc/staticappsclient:stable` image is updated, not sure if that would be possible.
**Describe alternatives you've considered**
I considered building the action image once and pushing it to my own namespace, but that would only help myself and not all the other developers.
**Additional context**
Check out [this post](https://svrooij.io/2022/06/09/building-github-action-in-net/) where I documented how I made my own [github action](https://github.com/svrooij/dotnet-feeder) with a dotnet application.
My action only takes 3 seconds to pull.
 to be fair it also only takes [19 seconds](https://github.com/svrooij/dotnet-feeder/runs/6713193477?check_suite_focus=true) to build and push the image, so I guess the image is smaller anyway.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.