From be1852e6e53894706775aafbc27449312f190e69 Mon Sep 17 00:00:00 2001 From: Uday Vidyadharan <55924756+uvidyadharan@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:52:52 -0600 Subject: [PATCH] Change Dev Container Build (#262) * Update devcontainer.json * Remove Dockerfile Build --- .devcontainer/devcontainer.json | 5 +++- .github/workflows/devcontainer.yaml | 45 ----------------------------- 2 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/devcontainer.yaml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f866a68f..50245d40 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,9 @@ { "name": "Dockerfile", - "image": "ghcr.io/first-tech-challenge/ftcdocs:main", + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, "customizations": { "vscode": { "extensions": [ diff --git a/.github/workflows/devcontainer.yaml b/.github/workflows/devcontainer.yaml deleted file mode 100644 index 1e1d04b0..00000000 --- a/.github/workflows/devcontainer.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: "Devcontainer Build" - -on: - workflow_dispatch: - push: - branches: - - main -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-push: - runs-on: ubuntu-latest - if: github.repository == 'FIRST-Tech-Challenge/ftcdocs' - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Sym link the Dockerfile - run: ln -s .devcontainer/Dockerfile Dockerfile - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file