Skip to content

Commit

Permalink
Simplify docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
myoung34 committed Jan 28, 2020
1 parent f48b160 commit 25ddc31
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 76 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker buildx build -f Dockerfile.ubuntu -t myoung34/github-runner:latest --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
run: docker buildx build -f Dockerfile -t myoung34/github-runner:latest --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
ubuntu_bionic_deploy:
runs-on: ubuntu-latest
steps:
Expand All @@ -34,6 +34,8 @@ jobs:
version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
run: cp Dockerfile Dockerfile.ubuntu-bionic; sed -i.bak 's/FROM.*/FROM ubuntu:bionic/' Dockerfile.ubuntu-bionic
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
Expand All @@ -50,6 +52,8 @@ jobs:
version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Copy Dockerfile
run: cp Dockerfile Dockerfile.ubuntu-xenial; sed -i.bak 's/FROM.*/FROM ubuntu:xenial/' Dockerfile.ubuntu-xenial
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.bak
4 changes: 1 addition & 3 deletions Dockerfile.ubuntu → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:rolling
LABEL maintainer="[email protected]"

ARG GIT_VERSION="2.23.0"
ENV DEBIAN_FRONTEND=noninteractive
ARG GH_RUNNER_VERSION="2.165.0"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003
Expand Down Expand Up @@ -44,8 +44,6 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
WORKDIR /actions-runner
COPY install_actions.sh /actions-runner

# Put version here to prevent cache invalidation
ENV GH_RUNNER_VERSION="2.165.0"
RUN chmod +x /actions-runner/install_actions.sh \
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} \
&& rm /actions-runner/install_actions.sh
Expand Down
36 changes: 0 additions & 36 deletions Dockerfile.ubuntu-bionic

This file was deleted.

36 changes: 0 additions & 36 deletions Dockerfile.ubuntu-xenial

This file was deleted.

0 comments on commit 25ddc31

Please sign in to comment.