From 7e7d6d5cafd413f69e81dbcb1cb7e5e1c70829fc Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Tue, 1 Aug 2023 13:01:09 +0000 Subject: [PATCH] github action for building container, using cache --- .github/workflows/devcontainer.yml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/devcontainer.yml diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml new file mode 100644 index 000000000..4ccb2d021 --- /dev/null +++ b/.github/workflows/devcontainer.yml @@ -0,0 +1,42 @@ +name: "Build devcontainer" + +on: + workflow_dispatch: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + # - + # name: Checkout + # uses: actions/checkout@v3 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/citusdata/citus-devcontainer + tags: | + type=ref,event=branch + type=sha + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: 'Login to GitHub Container Registry' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - + name: Build and push + uses: docker/build-push-action@v4 + with: + context: "{{defaultContext}}:.devcontainer" + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max