-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enable weekly build of flutter Dev Container
This commit configures a scheduled GitHub Workflow to periodically build and push the Dev Container image into the GitHub Container Registry. This allows to use the prebuilt image directly, thereby dramatically reducing the time to start and open the project in the Dev Container.
- Loading branch information
1 parent
0fbe542
commit 52afd7f
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
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
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,29 @@ | ||
name: Build Dev Container | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
devcontainer: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Pre-build dev container image | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/${{ github.repository_owner }}/flutter-devcontainer | ||
imageTag: latest | ||
cacheFrom: ghcr.io/${{ github.repository_owner }}/flutter-devcontainer:latest | ||
push: always |