From fadd02176ccd941d88b6fdba1236fdc480480494 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Tue, 31 Oct 2023 13:32:49 -0500 Subject: [PATCH] Configure prototype image builds --- .github/workflows/build_prototype.yml | 32 +++++++++++++++++++++++++++ Dockerfile | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_prototype.yml diff --git a/.github/workflows/build_prototype.yml b/.github/workflows/build_prototype.yml new file mode 100644 index 0000000..1e98ec8 --- /dev/null +++ b/.github/workflows/build_prototype.yml @@ -0,0 +1,32 @@ +name: Build Docker Image + +on: + push: + branches: + - feature/osc-prototype + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - 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 Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: ${{ github.event_name == 'push' }} + cache-from: type=gha + cache-to: type=gha,mode=max + tags: | + ghcr.io/${{ github.repository }}:prototype + ghcr.io/${{ github.repository }}:${{ github.sha }} diff --git a/Dockerfile b/Dockerfile index 478b194..7d6be54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get install -y gh # Install CumulusCI RUN pip install --no-cache-dir --upgrade pip pip-tools \ - pip --no-cache-dir install cumulusci cookiecutter + pip --no-cache-dir install git+https://github.com/SFDO-Community-Sprints/CumulusCI@feature/github-environments cookiecutter # Copy devhub auth script and make it executable COPY devhub.sh /usr/local/bin/devhub.sh