Skip to content

Commit

Permalink
ci: prebuild dev containers
Browse files Browse the repository at this point in the history
Fixes #2181

Add a GitHub Actions workflow to prebuild dev containers and update devcontainer configuration.

* **Add GitHub Actions workflow**: Create `.github/workflows/prebuild-devcontainers.yml` to schedule and trigger builds for the dev container image.
* **Add devcontainer configuration**: Create `.devcontainer/devcontainer.jso` to specify the image to be used for the dev container.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dashpay/platform/issues/2181?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
shumkov committed Sep 28, 2024
1 parent 4ae1efd commit e81ab18
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.jso
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Dash Platform Dev Container",
"image": "ghcr.io/dashpay/platform/devcontainer"
}
40 changes: 40 additions & 0 deletions .github/workflows/prebuild-devcontainers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Prebuild Dev Containers

on:
schedule:
- cron: "0 0 * * *"
push:
paths:
- '.devcontainer/**'
- '.github/workflows/prebuild-devcontainers.yml'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up QEMU for multi-architecture builds
uses: docker/setup-qemu-action@v3

- name: Setup Docker buildx for multi-architecture builds
uses: docker/setup-buildx-action@v3
with:
use: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: dashpay
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Platform devcontainer
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/dashpay/platform/devcontainer
platform: linux/amd64,linux/arm64
configFile: .devcontainer/build.json
push: true
cacheFrom: ghcr.io/dashpay/platform/devcontainer

0 comments on commit e81ab18

Please sign in to comment.