forked from myoung34/docker-github-actions-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert docker-build-push action until a solution is found for it re-c…
…loning and removing changes to the Dockerfile
- Loading branch information
Showing
3 changed files
with
143 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,71 @@ | ||
name: GitHub Actions Runner in Docker - Base | ||
on: | ||
push: | ||
paths: [Dockerfile.base] | ||
paths: | ||
- Dockerfile.base | ||
branches: | ||
- master | ||
- develop | ||
schedule: [cron: "0 22 * * *"] | ||
schedule: | ||
- cron: '0 22 * * *' | ||
|
||
|
||
jobs: | ||
ubuntu_base_latest_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Copy Repo Files | ||
uses: actions/checkout@master | ||
- name: Get GitHub organization or user | ||
run: echo ::set-output name=ORG::$(dirname ${GITHUB_REPOSITORY}) | ||
id: org | ||
shell: bash | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
install: true | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ${{ steps.org.outputs.ORG }}/github-runner-base:latest | ||
platforms: linux/amd64,linux/arm64 | ||
file: ./Dockerfile.base | ||
|
||
- name: Copy Repo Files | ||
uses: actions/checkout@master | ||
- name: Get GitHub organization or user | ||
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY}) | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
with: | ||
buildx-version: latest | ||
- name: Available platforms | ||
run: echo ${{ steps.buildx.outputs.platforms }} | ||
- name: Login | ||
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build | ||
run: docker buildx build -f Dockerfile.base -t ${ORG}/github-runner-base:latest --output "type=image,push=true" --platform linux/amd64,linux/arm64 . | ||
ubuntu_base_bionic_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Get GitHub organization or user | ||
run: echo ::set-output name=ORG::$(dirname ${GITHUB_REPOSITORY}) | ||
id: org | ||
shell: bash | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
install: true | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Copy Dockerfile | ||
run: cp Dockerfile.base Dockerfile.base.ubuntu-bionic; sed -i.bak 's/FROM.*/FROM ubuntu:bionic/' Dockerfile.base.ubuntu-bionic | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ${{ steps.org.outputs.ORG }}/github-runner-base:ubuntu-bionic | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
file: ./Dockerfile.base.ubuntu-bionic | ||
|
||
- name: Copy Repo Files | ||
uses: actions/checkout@master | ||
- name: Get GitHub organization or user | ||
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY}) | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
with: | ||
buildx-version: latest | ||
- name: Available platforms | ||
run: echo ${{ steps.buildx.outputs.platforms }} | ||
- name: Copy Dockerfile | ||
run: cp Dockerfile.base Dockerfile.base.ubuntu-bionic; sed -i.bak 's/FROM.*/FROM ubuntu:bionic/' Dockerfile.base.ubuntu-bionic | ||
- name: Login | ||
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build | ||
run: docker buildx build -f Dockerfile.base.ubuntu-bionic -t ${ORG}/github-runner-base:ubuntu-bionic --output "type=image,push=true" --platform linux/amd64,linux/arm/v7,linux/arm64 . | ||
ubuntu_base_xenial_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Get GitHub organization or user | ||
run: echo ::set-output name=ORG::$(dirname ${GITHUB_REPOSITORY}) | ||
id: org | ||
shell: bash | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
install: true | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Copy Dockerfile | ||
run: cp Dockerfile.base Dockerfile.base.ubuntu-xenial; sed -i.bak 's/FROM.*/FROM ubuntu:xenial/' Dockerfile.base.ubuntu-xenial | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ${{ steps.org.outputs.ORG }}/github-runner-base:ubuntu-xenial | ||
platforms: linux/amd64,linux/arm64 | ||
file: ./Dockerfile.base.ubuntu-xenial | ||
- name: Copy Repo Files | ||
uses: actions/checkout@master | ||
- name: Get GitHub organization or user | ||
run: echo ::set-env name=ORG::$(dirname ${GITHUB_REPOSITORY}) | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
with: | ||
buildx-version: latest | ||
- name: Available platforms | ||
run: echo ${{ steps.buildx.outputs.platforms }} | ||
- name: Copy Dockerfile | ||
run: cp Dockerfile.base Dockerfile.base.ubuntu-xenial; sed -i.bak 's/FROM.*/FROM ubuntu:xenial/' Dockerfile.base.ubuntu-xenial | ||
- name: Login | ||
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build | ||
run: docker buildx build -f Dockerfile.base.ubuntu-xenial -t ${ORG}/github-runner-base:ubuntu-xenial --output "type=image,push=true" --platform linux/amd64,linux/arm64 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.