Skip to content

Commit 25ddc31

Browse files
committed
Simplify docker builds
1 parent f48b160 commit 25ddc31

File tree

5 files changed

+7
-76
lines changed

5 files changed

+7
-76
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Login
2222
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
2323
- name: Build
24-
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 .
24+
run: docker buildx build -f Dockerfile -t myoung34/github-runner:latest --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 .
2525
ubuntu_bionic_deploy:
2626
runs-on: ubuntu-latest
2727
steps:
@@ -34,6 +34,8 @@ jobs:
3434
version: latest
3535
- name: Available platforms
3636
run: echo ${{ steps.buildx.outputs.platforms }}
37+
- name: Copy Dockerfile
38+
run: cp Dockerfile Dockerfile.ubuntu-bionic; sed -i.bak 's/FROM.*/FROM ubuntu:bionic/' Dockerfile.ubuntu-bionic
3739
- name: Login
3840
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
3941
- name: Build
@@ -50,6 +52,8 @@ jobs:
5052
version: latest
5153
- name: Available platforms
5254
run: echo ${{ steps.buildx.outputs.platforms }}
55+
- name: Copy Dockerfile
56+
run: cp Dockerfile Dockerfile.ubuntu-xenial; sed -i.bak 's/FROM.*/FROM ubuntu:xenial/' Dockerfile.ubuntu-xenial
5357
- name: Login
5458
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
5559
- name: Build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.bak

Dockerfile.ubuntu renamed to Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:rolling
22
LABEL maintainer="3vilpenguin@gmail.com"
33

44
ARG GIT_VERSION="2.23.0"
5-
ENV DEBIAN_FRONTEND=noninteractive
5+
ARG GH_RUNNER_VERSION="2.165.0"
66

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

47-
# Put version here to prevent cache invalidation
48-
ENV GH_RUNNER_VERSION="2.165.0"
4947
RUN chmod +x /actions-runner/install_actions.sh \
5048
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} \
5149
&& rm /actions-runner/install_actions.sh

Dockerfile.ubuntu-bionic

Lines changed: 0 additions & 36 deletions
This file was deleted.

Dockerfile.ubuntu-xenial

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)