diff --git a/.github/workflows/devcontainer.yaml b/.github/workflows/devcontainer.yaml new file mode 100644 index 00000000000..a5436ad698a --- /dev/null +++ b/.github/workflows/devcontainer.yaml @@ -0,0 +1,44 @@ +name: Build DevContainer image +on: + workflow_dispatch: + push: + branches: + - dodo + paths: + - ".devcontainer/**" + +jobs: + push: + name: Build DevContainer image + runs-on: ubuntu-latest + env: + DEVCONTAINER_IMAGE_TAG: v0.1 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push (for main branch) + uses: docker/build-push-action@v4 + with: + file: ".devcontainer/Dockerfile" + push: true + tags: > + ghcr.io/${{ github.repository }}-devcontainer:latest, + ghcr.io/${{ github.repository }}-devcontainer:${{ env.DEVCONTAINER_IMAGE_TAG }} + platforms: | + linux/arm64 + linux/amd64 + - name: Output image tags + run: | + echo "## Built images with the following tags" >> $GITHUB_STEP_SUMMARY + echo "### ghcr.io/${{ github.repository }}-devcontainer:latest" >> $GITHUB_STEP_SUMMARY + echo "### ghcr.io/${{ github.repository }}-devcontainer:${{ env.DEVCONTAINER_IMAGE_TAG }}" >> $GITHUB_STEP_SUMMARY