diff --git a/.devcontainer/devcontainer.json b/.devcontainer/build.json similarity index 100% rename from .devcontainer/devcontainer.json rename to .devcontainer/build.json diff --git a/.devcontainer/devcontainer.jso b/.devcontainer/devcontainer.jso new file mode 100644 index 0000000000..812703468a --- /dev/null +++ b/.devcontainer/devcontainer.jso @@ -0,0 +1,4 @@ +{ + "name": "Dash Platform Dev Container", + "image": "ghcr.io/dashpay/platform/devcontainer" +} diff --git a/.github/workflows/prebuild-devcontainers.yml b/.github/workflows/prebuild-devcontainers.yml new file mode 100644 index 0000000000..6c68d7a9a6 --- /dev/null +++ b/.github/workflows/prebuild-devcontainers.yml @@ -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/ci@v0.3 + with: + imageName: ghcr.io/dashpay/platform/devcontainer + platform: linux/amd64,linux/arm64 + configFile: .devcontainer/build.json + push: true + cacheFrom: ghcr.io/dashpay/platform/devcontainer