From ab8fcb82c80c4a55baf6f42fa522f1a964b17793 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 10:59:50 -0500 Subject: [PATCH 01/12] Fix the Docker build by porting to salesforce-cli Port the Docker build to use salesforce-cli and update the workflow for multi-arch Docker image builds. * Change the base image in `Dockerfile` to `salesforce/cli:latest-full`. * Remove the installation of `sfdx-cli` and add the installation of `python3-pip`, `gh` (GitHub CLI), and `CumulusCI`. * Add stages for full browser support (ChromeDriver + Playwright) and no browser automation support in `Dockerfile`. * Rename `.github/workflows/build.yml` to `.github/workflows/docker-publish.yml`. * Update the workflow to include multi-arch Docker image build and push steps. * Add a matrix strategy for `target` and `platform`. * Add steps for setting up QEMU, Docker Buildx, and logging into GitHub Container Registry. * Add a new workflow file `.github/workflows/docker/publish.yml` for building and publishing Docker images. * Include multi-arch Docker image build and push steps. * Set the workflow name to "Build Multi-Arch Docker Images". * Add a matrix strategy for `target` and `platform`. * Add steps for setting up QEMU, Docker Buildx, and logging into GitHub Container Registry. * Add `.github/dependabot.yml` for dependabot configuration. * Set update schedule to daily. * Add configuration for GitHub Actions, Docker, and Python updates. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/muselab-d2x/d2x?shareId=XXXX-XXXX-XXXX-XXXX). --- .github/dependabot.yml | 14 +++++ .github/workflows/build.yml | 33 ---------- .github/workflows/docker-publish.yml | 90 ++++++++++++++++++++++++++++ .github/workflows/docker/publish.yml | 90 ++++++++++++++++++++++++++++ Dockerfile | 70 ++++++++++++++-------- 5 files changed, 239 insertions(+), 58 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/docker-publish.yml create mode 100644 .github/workflows/docker/publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c4525f6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 6ad8d53..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build Docker Image - -on: - workflow_dispatch: - push: - branches: - - main - -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 }}:latest - ghcr.io/${{ github.repository }}:${{ github.sha }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..74ed4fa --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,90 @@ +name: Build Multi-Arch Docker Images + +on: + push: + branches: + - main + - cumulusci-next** + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + target: [no-browser, browser] + platform: [linux/amd64, linux/arm64] + steps: + - name: Checkout repository + 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: Set environment variables + run: | + if [ "${{ github.ref_name }}" == "main" ]; then + echo "IMAGE_TAG=latest" >> $GITHUB_ENV + else + echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + fi + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: ${{ github.event_name == 'push' }} + tags: | + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}${{ matrix.target == 'browser' && '-browser' || '' }}${{ matrix.platform == 'linux/arm64' && '-arm64' || '' }} + platforms: ${{ matrix.platform }} + target: ${{ matrix.target }} + cache-from: type=gha + cache-to: type=gha,mode=max + + merge-manifests: + needs: build + runs-on: ubuntu-latest + steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set environment variables + run: | + if [ "${{ github.ref_name }}" == "main" ]; then + echo "IMAGE_TAG=latest" >> $GITHUB_ENV + else + echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + fi + + - name: Create and push multi-arch manifests + run: | + # For no-browser + docker buildx imagetools create -t ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-arm64 + + # For browser + docker buildx imagetools create -t ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser-arm64 + + - name: Inspect manifests + run: | + echo "Inspecting no-browser manifest:" + docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} + echo "Inspecting browser manifest:" + docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml new file mode 100644 index 0000000..74ed4fa --- /dev/null +++ b/.github/workflows/docker/publish.yml @@ -0,0 +1,90 @@ +name: Build Multi-Arch Docker Images + +on: + push: + branches: + - main + - cumulusci-next** + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + target: [no-browser, browser] + platform: [linux/amd64, linux/arm64] + steps: + - name: Checkout repository + 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: Set environment variables + run: | + if [ "${{ github.ref_name }}" == "main" ]; then + echo "IMAGE_TAG=latest" >> $GITHUB_ENV + else + echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + fi + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: ${{ github.event_name == 'push' }} + tags: | + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}${{ matrix.target == 'browser' && '-browser' || '' }}${{ matrix.platform == 'linux/arm64' && '-arm64' || '' }} + platforms: ${{ matrix.platform }} + target: ${{ matrix.target }} + cache-from: type=gha + cache-to: type=gha,mode=max + + merge-manifests: + needs: build + runs-on: ubuntu-latest + steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set environment variables + run: | + if [ "${{ github.ref_name }}" == "main" ]; then + echo "IMAGE_TAG=latest" >> $GITHUB_ENV + else + echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + fi + + - name: Create and push multi-arch manifests + run: | + # For no-browser + docker buildx imagetools create -t ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-arm64 + + # For browser + docker buildx imagetools create -t ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser \ + ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser-arm64 + + - name: Inspect manifests + run: | + echo "Inspecting no-browser manifest:" + docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} + echo "Inspecting browser manifest:" + docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}-browser diff --git a/Dockerfile b/Dockerfile index 478b194..43144d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,18 @@ -FROM python:3.11-slim-bookworm +# Base stage +FROM salesforce/cli:latest-full AS base -LABEL org.opencontainers.image.source = "https://github.com/muselab-d2x/d2x" +LABEL org.opencontainers.image.source="https://github.com/muselab-d2x/d2x" -# Install sfdx -RUN apt-get update -RUN apt-get upgrade -y -RUN apt-get install -y gnupg wget curl git -RUN \ - echo "deb https://deb.nodesource.com/node_20.x bullseye main" > /etc/apt/sources.list.d/nodesource.list && \ - wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ - apt-get update -RUN apt-get install -y nodejs -RUN npm install --global npm jq commander -RUN npm install --global sfdx-cli --ignore-scripts - -# Install Salesforce CLI plugins: -RUN sfdx plugins:install @salesforce/sfdx-scanner +# Install Python +RUN apt-get update && apt-get upgrade -y && apt-get install -y python3-pip # Install GitHub CLI -RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg; -RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null; -RUN apt-get install -y gh +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ + apt-get update && apt-get install -y gh # Install CumulusCI -RUN pip install --no-cache-dir --upgrade pip pip-tools \ - pip --no-cache-dir install cumulusci cookiecutter +RUN pip --no-cache-dir install git+https://github.com/muselab-d2x/CumulusCI@d2x cookiecutter # Copy devhub auth script and make it executable COPY devhub.sh /usr/local/bin/devhub.sh @@ -34,10 +22,42 @@ RUN chmod +x /usr/local/bin/devhub.sh RUN useradd -r -m -s /bin/bash -c "D2X User" d2x # Setup PATH -RUN echo 'export PATH=~/.local/bin:$PATH' >> /root/.bashrc -RUN echo 'export PATH=~/.local/bin:$PATH' >> /home/d2x/.bashrc -RUN echo '/usr/local/bin/devhub.sh' >> /root/.bashrc -RUN echo '/usr/local/bin/devhub.sh' >> /home/d2x/.bashrc +RUN echo 'export PATH=~/.local/bin:$PATH' >> /root/.bashrc && \ + echo 'export PATH=~/.local/bin:$PATH' >> /home/d2x/.bashrc && \ + echo '/usr/local/bin/devhub.sh' >> /root/.bashrc && \ + echo '/usr/local/bin/devhub.sh' >> /home/d2x/.bashrc + +# # Stage for ChromeDriver +# FROM base AS chromedriver + +# # Install ChromeDriver +# RUN apt-get install -y wget unzip && \ +# wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \ +# unzip /tmp/chromedriver.zip -d /usr/local/bin/ && \ +# rm /tmp/chromedriver.zip + +# # Stage for Playwright +# FROM base AS playwright + +# # Install Playwright +# RUN npm install -g playwright && \ +# npx playwright install + +# Stage for full browser support (ChromeDriver + Playwright) +FROM base AS browser + +# # Install ChromeDriver +# RUN apt-get install -y wget unzip && \ +# wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \ +# unzip /tmp/chromedriver.zip -d /usr/local/bin/ && \ +# rm /tmp/chromedriver.zip + +# Install Playwright +RUN cci robot install_playwright \ + && npx playwright install-deps + +# Final stage for no browser automation support +FROM base AS no-browser USER d2x CMD ["bash"] From a19a58bf807167725a6511fbcdacceafa26c3dde Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 11:26:33 -0500 Subject: [PATCH 02/12] Rename `.github/workflows/build.yml` to `.github/workflows/docker-publish.yml` Add branch `jlantz/fix-docker-build` to the push branches in `.github/workflows/docker-publish.yml` --- .github/workflows/docker-publish.yml | 1 + .github/workflows/docker/publish.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 74ed4fa..03a2e54 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -5,6 +5,7 @@ on: branches: - main - cumulusci-next** + - jlantz/fix-docker-build workflow_dispatch: jobs: diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index 74ed4fa..03a2e54 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -5,6 +5,7 @@ on: branches: - main - cumulusci-next** + - jlantz/fix-docker-build workflow_dispatch: jobs: From 9ae433d042fc0c9b74b441bfaec82cb8bec6d282 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 11:39:01 -0500 Subject: [PATCH 03/12] Rename `.github/workflows/build.yml` to `.github/workflows/docker-publish.yml` * Update the `IMAGE_TAG` assignment to replace slashes with hyphens in branch names * Change the Docker build and push action to use `docker/build-push-action@v4` --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 03a2e54..0c07477 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -37,7 +37,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "IMAGE_TAG=${{ github.ref_name }} | sed -e 's/\//-/g'" >> $GITHUB_ENV fi - name: Build and push Docker image From 2d5d9667441299f7e1fc9fe1a2002cc0a538e703 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 12:03:13 -0500 Subject: [PATCH 04/12] Fix branch name handling in Docker image tag * **Environment Variable**: Replace `/` with `-` in branch name for `IMAGE_TAG` environment variable --- .github/workflows/docker/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index 03a2e54..d7df4ab 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -37,7 +37,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "IMAGE_TAG=${{ github.ref_name } | sed -e 's/\//-/g'}" >> $GITHUB_ENV fi - name: Build and push Docker image From 37b8dfd93aa51bd67ffce7c94e0534a83b4412f6 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 16:16:40 -0500 Subject: [PATCH 05/12] Fix environment variable setting in Docker publish workflow * Escape the forward slash in the sed command to correctly replace `/` with `-` in branch names --- .github/workflows/docker/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index d7df4ab..8e28106 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -37,7 +37,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name } | sed -e 's/\//-/g'}" >> $GITHUB_ENV + echo "IMAGE_TAG=${{ github.ref_name } | sed -e 's/\\//-/g'}" >> $GITHUB_ENV fi - name: Build and push Docker image From 778e20b42833fa555387c150075294af065a6b0c Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 16:55:13 -0500 Subject: [PATCH 06/12] Fix setting environment variables in Docker publish workflow * Fix the command to set the `IMAGE_TAG` environment variable by using `echo` and `sed` to replace `/` with `-` in the branch name * Update the step name for building and pushing the Docker image to use `docker/build-push-action@v4` --- .github/workflows/docker/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index 8e28106..7abea4e 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -37,7 +37,8 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name } | sed -e 's/\\//-/g'}" >> $GITHUB_ENV + IMAGE_TAG=$(echo "${{ github.ref_name }}" | sed -e 's/\//-/g') + echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV fi - name: Build and push Docker image From 5d80ca89c35c72500a0c6bf431900d93a4c68ee5 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 18:05:21 -0500 Subject: [PATCH 07/12] Update `.github/workflows/docker/publish.yml` to fix invalid tag format * **Fix tag format**: Replace `/` in branch name with `-` using `sed` command in `IMAGE_TAG` assignment --- .github/workflows/docker/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index 7abea4e..734b679 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -69,7 +69,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "IMAGE_TAG=`${echo ${{ github.ref_name }} | sed -e 's/\\//g' }" >> $GITHUB_ENV fi - name: Create and push multi-arch manifests From 036aad0530caf052ce3682a531f94df94b23effb Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 18:06:45 -0500 Subject: [PATCH 08/12] Update `.github/workflows/docker/publish.yml` to fix invalid tag format * Replace the branch name in the `IMAGE_TAG` with a hardcoded value `jlantz-fix-docker-build` to avoid invalid reference format error --- .github/workflows/docker/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index 734b679..e66cc96 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -69,7 +69,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=`${echo ${{ github.ref_name }} | sed -e 's/\\//g' }" >> $GITHUB_ENV + echo "IMAGE_TAG=jlantz-fix-docker-build" >> $GITHUB_ENV fi - name: Create and push multi-arch manifests From 672cc5a2dddcabbd799b7e1aaef65a66b714ed82 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 18:10:38 -0500 Subject: [PATCH 09/12] Update docker-publish.yml Hardcode branch to get a build --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0c07477..9c56f2d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -68,7 +68,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "IMAGE_TAG=jlantz-test" >> $GITHUB_ENV fi - name: Create and push multi-arch manifests From 33429ab75da9c148dce5b9694bfb2ab5d522eb43 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 18:11:24 -0500 Subject: [PATCH 10/12] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 9c56f2d..dd4d4cf 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -37,7 +37,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=${{ github.ref_name }} | sed -e 's/\//-/g'" >> $GITHUB_ENV + echo "IMAGE_TAG=jlantz-test'" >> $GITHUB_ENV fi - name: Build and push Docker image From 9f5e1d80dbf5cbac6b4126622c356d1cf6e23d52 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 18:13:10 -0500 Subject: [PATCH 11/12] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index dd4d4cf..b6e0846 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -37,7 +37,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=jlantz-test'" >> $GITHUB_ENV + echo "IMAGE_TAG=jlantz-test" >> $GITHUB_ENV fi - name: Build and push Docker image From 635b9e39b2b5ba0578e902675ee1a862694d2370 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Wed, 30 Oct 2024 18:19:34 -0500 Subject: [PATCH 12/12] Remove hard coded test branch - build will fail, it's OK! --- .github/workflows/docker/publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker/publish.yml b/.github/workflows/docker/publish.yml index e66cc96..7588111 100644 --- a/.github/workflows/docker/publish.yml +++ b/.github/workflows/docker/publish.yml @@ -5,7 +5,6 @@ on: branches: - main - cumulusci-next** - - jlantz/fix-docker-build workflow_dispatch: jobs: @@ -69,7 +68,7 @@ jobs: if [ "${{ github.ref_name }}" == "main" ]; then echo "IMAGE_TAG=latest" >> $GITHUB_ENV else - echo "IMAGE_TAG=jlantz-fix-docker-build" >> $GITHUB_ENV + echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV fi - name: Create and push multi-arch manifests