summaryrefslogtreecommitdiff
path: root/.github/workflows/update-base.yaml
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2021-01-18 14:59:31 +0100
committerLukas Larsson <lukas@erlang.org>2021-01-20 11:23:56 +0100
commit245f1c267b9c63443708e80f3dbb6b2f676f35cd (patch)
treef026d0593bea051cfca1522cf9cf465e6a4451f1 /.github/workflows/update-base.yaml
parentbd21de9d844d8f7a1063ca5f2623c297f8b10e2e (diff)
downloaderlang-245f1c267b9c63443708e80f3dbb6b2f676f35cd.tar.gz
Rework docker build to use new docker build action
Diffstat (limited to '.github/workflows/update-base.yaml')
-rw-r--r--.github/workflows/update-base.yaml60
1 files changed, 24 insertions, 36 deletions
diff --git a/.github/workflows/update-base.yaml b/.github/workflows/update-base.yaml
index ed250262e7..081480492a 100644
--- a/.github/workflows/update-base.yaml
+++ b/.github/workflows/update-base.yaml
@@ -9,48 +9,36 @@ on:
## Build base images to be used by other github workflows
jobs:
- build-debian-64bit:
+ build:
+ name: Update base Erlang/OTP build images
if: github.repository == 'erlang/otp'
runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Build and push 64-bit base image
- uses: docker/build-push-action@v1
- with:
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- registry: docker.pkg.github.com
- dockerfile: .github/dockerfiles/Dockerfile.debian-base
- repository: erlang/otp/debian-base
- tags: latest
- build-debian-32bit:
- if: github.repository == 'erlang/otp'
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Build and push 32-bit base image
- uses: docker/build-push-action@v1
- with:
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- registry: docker.pkg.github.com
- dockerfile: .github/dockerfiles/Dockerfile.debian-base
- build_args: "BASE=i386/debian"
- repository: erlang/otp/i386-debian-base
- tags: latest
+ strategy:
+ matrix:
+ type: [debian-base,ubuntu-base,i386-debian-base]
- build-ubuntu-64bit:
- if: github.repository == 'erlang/otp'
- runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Build and push 64-bit base image
- uses: docker/build-push-action@v1
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ with:
+ driver: docker
+ - name: Docker login
+ uses: docker/login-action@v1
with:
+ registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- registry: docker.pkg.github.com
- dockerfile: .github/dockerfiles/Dockerfile.ubuntu-base
- repository: erlang/otp/ubuntu-base
- tags: latest
+ - name: Calculate BASE image
+ id: base
+ run: .github/scripts/base-tag "${{ matrix.type }}"
+ - name: Build and push base image
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ file: .github/dockerfiles/Dockerfile.${{ steps.base.outputs.BASE_TYPE }}
+ pull: true
+ push: true
+ build-args: BASE=${{ steps.base.outputs.BASE }}
+ tags: docker.pkg.github.com/${{ github.repository }}/${{ matrix.type }}:latest