Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 215 update alpine #238

Merged
merged 14 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

# Secrets and defaults should not have a newline at their eof.
[secrets/*,defaults/*]
end_of_line = lf
insert_final_newline = false
indent_size = 0
34 changes: 34 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Provide environment variables for configuring docker-compose, *not* the
# containers themselves.
#
# Note that this is simple string assignment, quotes should *not* be used.
# Multiple lines or commands, or bash syntax will not work.
#
# References:
# - https://docs.docker.com/compose/env-file/
# - https://docs.docker.com/compose/reference/envvars/
COMPOSE_PROJECT_NAME=isle-buildkit

# Use buildkit when building images.
COMPOSE_DOCKER_CLI_BUILD=1
DOCKER_BUILDKIT=1

# Required for traefik on OSX (inconsistent behavior).
DOCKER_CLIENT_TIMEOUT=120
COMPOSE_HTTP_TIMEOUT=120

# The consistency requirements for bind mounts; one of:
#
# - consistent: Full consistency. The container runtime and the host maintain an identical view of the mount at all times.
# - cached: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.
# - delegated: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.
#
# Note that using 'consistent' can be very slow.
CONSISTENCY=delegated

# The Docker image repository, to use for isle-buildkit images.
#
REPOSITORY=islandora

# The version of the isle-buildkit images to use.
TAG=local
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build
on:
workflow_call:
inputs:
repository:
required: true
type: string
image:
required: true
type: string
tags:
required: true
type: string
contexts:
required: false
type: string
outputs:
digest:
description: "Digest argument for Gradle"
value: ${{ jobs.build.outputs.digest }}
context:
description: "Context to use in dependent images"
value: ${{ jobs.build.outputs.context }}
secrets:
registry_user:
required: true
registry_password:
required: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
digest: ${{ steps.build.outputs.digest }}
context: ${{ steps.build.outputs.context }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.11.1
network=host
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.registry_user }}
password: ${{ secrets.registry_password }}
- id: build
name: Build and push
run: |
set -ex
make push manifest "BUILDER=${{ steps.buildx.outputs.name }}" "TARGET=${{ inputs.image }}-ci" "TAGS=${{ inputs.tags }}" "CONTEXTS=${{ inputs.contexts }}"
echo "digest=-Pisle.${{ inputs.image }}.digest=${{ inputs.repository }}/${{ inputs.image }}@sha256:$(cat build/${{ inputs.image }}.digest)" >> $GITHUB_OUTPUT
echo "context=docker-image://${{ inputs.repository }}/${{ inputs.image }}@sha256:$(cat build/${{ inputs.image }}.digest)" >> $GITHUB_OUTPUT
21 changes: 21 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Delete old DockerHub tags
on:
schedule:
- cron: "0 13 * * 0" # Every Sunday at 1PM UTC (9AM EST)
jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: |
deleteEligibleDockerHubTags
'-Pisle.dockerhub.personal.access.token=${{ secrets.REGISTRY_DOCKERHUB_TOKEN }}'
--no-parallel
Loading