Skip to content

Commit

Permalink
chore: update docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Jul 16, 2024
1 parent ee7a5df commit 5013f64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
25 changes: 0 additions & 25 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/cloud-builders/bazel:latest AS build
COPY . .
RUN ./cloudbuild.sh build //java/com/google/copybara:copybara_deploy.jar
RUN mkdir -p /tmp/copybara && \
cp bazel-bin/java/com/google/copybara/copybara_deploy.jar /tmp/copybara/

FROM golang:latest AS buildtools
RUN go install github.com/bazelbuild/buildtools/buildozer@latest
RUN go install github.com/bazelbuild/buildtools/buildifier@latest

FROM openjdk:11-jre-slim
WORKDIR /usr/src/app
ENV COPYBARA_CONFIG=copy.bara.sky \
COPYBARA_SUBCOMMAND=migrate \
COPYBARA_OPTIONS='' \
COPYBARA_WORKFLOW=default \
COPYBARA_SOURCEREF=''
COPY --from=build /tmp/copybara/ /opt/copybara/
COPY --from=buildtools /go/bin/buildozer /go/bin/buildifier /usr/bin/
COPY .docker/entrypoint.sh /usr/local/bin/copybara
RUN chmod +x /usr/local/bin/copybara
RUN apt-get update && \
apt-get install -y git && \
apt-get clean
4 changes: 2 additions & 2 deletions .github/workflows/copybara-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: yourdockerhubusername
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: shreyasbhat0
password: ${{ secrets.COPYBARA_DOCKER_HUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
Expand Down

0 comments on commit 5013f64

Please sign in to comment.