Renamed Runner Dockerfiles (#1248)
Renamed the runner dockerfiles so that we have proper syntax highlighting for them, as well as a consistent way to map from the image name to the dockerfile. Added a `.dockerignore` file to avoid uploading things to the daemon that we never use.
This commit is contained in:
parent
8035d6d9f8
commit
cdc9d20e7a
|
|
@ -34,11 +34,9 @@ jobs:
|
||||||
- name: actions-runner
|
- name: actions-runner
|
||||||
os-name: ubuntu
|
os-name: ubuntu
|
||||||
os-version: 20.04
|
os-version: 20.04
|
||||||
dockerfile: Dockerfile
|
|
||||||
- name: actions-runner-dind
|
- name: actions-runner-dind
|
||||||
os-name: ubuntu
|
os-name: ubuntu
|
||||||
os-version: 20.04
|
os-version: 20.04
|
||||||
dockerfile: Dockerfile.dindrunner
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -57,7 +55,7 @@ jobs:
|
||||||
uses: docker/build-push-action@c5e6528d5ddefc82f682165021e05edf58044bce
|
uses: docker/build-push-action@c5e6528d5ddefc82f682165021e05edf58044bce
|
||||||
with:
|
with:
|
||||||
context: ./runner
|
context: ./runner
|
||||||
file: ./runner/${{ matrix.dockerfile }}
|
file: ./runner/${{ matrix.name }}.dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: ${{ github.ref == 'master' && github.event.pull_request.merged == true }}
|
push: ${{ github.ref == 'master' && github.event.pull_request.merged == true }}
|
||||||
build-args: |
|
build-args: |
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
*.dockerfile
|
||||||
|
Makefile
|
||||||
|
|
@ -25,8 +25,18 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
docker-build-ubuntu:
|
docker-build-ubuntu:
|
||||||
docker build --build-arg TARGETPLATFORM=${TARGETPLATFORM} --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${NAME}:${TAG} .
|
docker build \
|
||||||
docker build --build-arg TARGETPLATFORM=${TARGETPLATFORM} --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${DIND_RUNNER_NAME}:${TAG} -f Dockerfile.dindrunner .
|
--build-arg TARGETPLATFORM=${TARGETPLATFORM} \
|
||||||
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
||||||
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
||||||
|
-f actions-runner.dockerfile \
|
||||||
|
-t ${NAME}:${TAG} .
|
||||||
|
docker build \
|
||||||
|
--build-arg TARGETPLATFORM=${TARGETPLATFORM} \
|
||||||
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
||||||
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
||||||
|
-f actions-runner-dind.dockerfile \
|
||||||
|
-t ${DIND_RUNNER_NAME}:${TAG} .
|
||||||
|
|
||||||
docker-push-ubuntu:
|
docker-push-ubuntu:
|
||||||
docker push ${NAME}:${TAG}
|
docker push ${NAME}:${TAG}
|
||||||
|
|
@ -41,12 +51,12 @@ docker-buildx-ubuntu:
|
||||||
docker buildx build --platform ${PLATFORMS} \
|
docker buildx build --platform ${PLATFORMS} \
|
||||||
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
||||||
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
||||||
|
-f actions-runner.dockerfile \
|
||||||
-t "${NAME}:${TAG}" \
|
-t "${NAME}:${TAG}" \
|
||||||
-f Dockerfile \
|
|
||||||
. ${PUSH_ARG}
|
. ${PUSH_ARG}
|
||||||
docker buildx build --platform ${PLATFORMS} \
|
docker buildx build --platform ${PLATFORMS} \
|
||||||
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
||||||
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
||||||
|
-f actions-runner-dind.dockerfile \
|
||||||
-t "${DIND_RUNNER_NAME}:${TAG}" \
|
-t "${DIND_RUNNER_NAME}:${TAG}" \
|
||||||
-f Dockerfile.dindrunner \
|
|
||||||
. ${PUSH_ARG}
|
. ${PUSH_ARG}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue