This is an automated email from the ASF dual-hosted git repository. kocolosk pushed a commit to branch multi-arch-updates in repository https://gitbox.apache.org/repos/asf/couchdb-ci.git
commit 53539f480d9ae255960e2b3a7abf775b67cee646 Author: Adam Kocoloski <[email protected]> AuthorDate: Mon Feb 7 22:13:35 2022 -0500 Add image builder action --- .github/workflows/image-builder.yml | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.github/workflows/image-builder.yml b/.github/workflows/image-builder.yml new file mode 100644 index 0000000..c98dcc5 --- /dev/null +++ b/.github/workflows/image-builder.yml @@ -0,0 +1,63 @@ +name: Image Builder + +on: + workflow_dispatch: + inputs: + dockerfile: + description: 'Dockerfile' + required: true + default: 'debian-bullseye' + erlangVersion: + description: 'Erlang/OTP Version' + required: true + default: '24.2' + elixirVersion: + description: 'Elixir Version' + required: true + default: 'v1.12.3' + platforms: + description: 'Target Platforms' + required: true + default: 'linux/amd64' + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + steps: + - name: Authenticate to container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Inspect builder + run: | + echo "Name: ${{ steps.buildx.outputs.name }}" + echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" + echo "Status: ${{ steps.buildx.outputs.status }}" + echo "Flags: ${{ steps.buildx.outputs.flags }}" + echo "Platforms: ${{ steps.buildx.outputs.platforms }}" + + - name: Build and push + uses: docker/build-push-action@v2 + with: + file: dockerfiles/${{ github.event.inputs.dockerfile }} + + push: true + + platforms: ${{ github.event.inputs.platforms }} + + build-args: | + erlangversion=${{ github.event.inputs.erlangVersion }} + elixirversion=${{ github.event.inputs.elixirVersion }} + tags: | + ghcr.io/apache/couchdb-ci:${{ github.event.inputs.dockerfile }}-erlang-${{ github.event.inputs.erlangVersion }}
