-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the time-to-deploy 2x quicker: 2mins vs 4mins
This replaces our Dagger on Fly.io setup with Dagger on Namespace.so While that was the initial intent, we actually made it 4x quicker: 1min vs 4mins. Also, this is less flaky than Fly.io connectivity from GitHub Actions Runners. And we don't run **both** the free GitHub Actions runner for the Dagger CLI, and the Dagger Engine on Fly.io. We still keep K8s to see if we can improve on Namespace.so, the new Speed King 🏎️ This is the first part of the required change. The second part will follow after this gets merged. We need to: - Cleanup secrets & variables from GitHub Actions - De-provision the Dagger Engine on Fly.io - Remove the deploy config from fly.io dir - Update the INFRASTRUCTURE diagram Signed-off-by: Gerhard Lazu <[email protected]>
- Loading branch information
Showing
3 changed files
with
65 additions
and
102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Dagger on Namespace" | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
run: | ||
runs-on: namespace-profile-changelog | ||
steps: | ||
- name: "Checkout code..." | ||
uses: namespacelabs/nscloud-checkout-action@v5 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
cache-dependency-path: "magefiles/go.sum" | ||
|
||
- name: "Provision Dagger with local cache" | ||
run: | | ||
docker run \ | ||
--name dagger-0-6-4 \ | ||
--detach --restart always \ | ||
--volume /cache/dagger-0-6-4:/var/lib/dagger \ | ||
--privileged \ | ||
registry.dagger.io/engine:v0.6.4 | ||
- name: "Build, test, publish & deploy..." | ||
env: | ||
IMAGE_OWNER: "${{ vars.IMAGE_OWNER }}" | ||
GHCR_USERNAME: "${{ github.actor }}" | ||
GHCR_PASSWORD: "${{ secrets.GHCR_PASSWORD }}" | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
R2_API_HOST: "${{ secrets.R2_API_HOST }}" | ||
R2_ACCESS_KEY_ID: "${{ secrets.R2_ACCESS_KEY_ID }}" | ||
R2_SECRET_ACCESS_KEY: "${{ secrets.R2_SECRET_ACCESS_KEY }}" | ||
R2_ASSETS_BUCKET: "${{ env.R2_ASSETS_BUCKET }}" | ||
OBAN_KEY_FINGERPRINT: "${{ secrets.OBAN_KEY_FINGERPRINT }}" | ||
OBAN_LICENSE_KEY: "${{ secrets.OBAN_LICENSE_KEY }}" | ||
_EXPERIMENTAL_DAGGER_RUNNER_HOST: "docker-container://dagger-0-6-4" | ||
run: | | ||
cd magefiles | ||
go run main.go -w ../ ci cd | ||
- name: "Announce deploy in #dev Slack..." | ||
if: ${{ github.repository == 'thechangelog/changelog.com' && github.ref_name == 'master' }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
MSG_MINIMAL: "commit,actions url" | ||
SLACK_CHANNEL: dev | ||
SLACK_USERNAME: "GitHub Actions" | ||
SLACK_FOOTER: "Just got shipped to https://changelog.com" | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters