mirror of
https://gitea.com/docker/build-push-action.git
synced 2025-12-06 21:29:47 +08:00
Compare commits
8 Commits
ci-oci-art
...
e2e-s3-cac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe8520559f | ||
|
|
f12a6112f8 | ||
|
|
410bc3c68c | ||
|
|
6909fbc5b1 | ||
|
|
9e436ba9f2 | ||
|
|
62929198b5 | ||
|
|
cb8fc7586f | ||
|
|
5225a9fc21 |
1
.github/e2e/nexus/install.sh
vendored
1
.github/e2e/nexus/install.sh
vendored
@@ -76,6 +76,7 @@ until $(curl --output /dev/null --silent --head --fail "http://$NEXUS_HOST:$NEXU
|
||||
printf '.'
|
||||
sleep 5
|
||||
done
|
||||
echo "ready!"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Change user's password"
|
||||
|
||||
36
.github/workflows/.e2e-run.yml
vendored
36
.github/workflows/.e2e-run.yml
vendored
@@ -25,11 +25,15 @@ on:
|
||||
password_secret:
|
||||
required: false
|
||||
type: string
|
||||
cache:
|
||||
required: false
|
||||
type: string
|
||||
default: registry
|
||||
|
||||
env:
|
||||
HARBOR_VERSION: v2.7.0
|
||||
HARBOR_VERSION: v2.13.2
|
||||
NEXUS_VERSION: 3.47.1
|
||||
DISTRIBUTION_VERSION: 2.8.1
|
||||
DISTRIBUTION_VERSION: 3.0.0
|
||||
|
||||
jobs:
|
||||
run:
|
||||
@@ -46,7 +50,7 @@ jobs:
|
||||
buildkit_image: moby/buildkit:buildx-stable-1
|
||||
-
|
||||
buildx_version: https://github.com/docker/buildx.git#master
|
||||
buildkit_image: moby/buildkit:master
|
||||
buildkit_image: crazymax/buildkit:s3patch
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
@@ -56,6 +60,24 @@ jobs:
|
||||
if: inputs.type == 'local'
|
||||
run: |
|
||||
cat ./.github/e2e/${{ inputs.id }}/env >> $GITHUB_ENV
|
||||
-
|
||||
name: Set up outputs
|
||||
uses: actions/github-script@v8
|
||||
env:
|
||||
INPUT_SLUG: ${{ env.REGISTRY_SLUG || inputs.slug }}
|
||||
INPUT_CACHE: ${{ inputs.cache }}
|
||||
with:
|
||||
script: |
|
||||
const inpSlug = core.getInput('slug');
|
||||
const inpCache = core.getInput('cache');
|
||||
if (inpCache === 'registry') {
|
||||
core.exportVariable('CACHE_FROM', `type=registry,ref=${inpSlug}:master`);
|
||||
core.exportVariable('CACHE_TO', 'type=inline');
|
||||
} else if (inpCache === 's3') {
|
||||
const cacheName = inpSlug.replace(/[^a-zA-Z0-9]/g, '-').toLowerCase();
|
||||
core.exportVariable('CACHE_FROM', `type=s3,region=us-east-2,bucket=buildkit-s3-cache-test,name=${cacheName}`);
|
||||
core.exportVariable('CACHE_TO', `type=s3,region=us-east-2,bucket=buildkit-s3-cache-test,name=${cacheName},mode=max`);
|
||||
}
|
||||
-
|
||||
name: Set up BuildKit config
|
||||
run: |
|
||||
@@ -121,8 +143,12 @@ jobs:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY_SLUG || inputs.slug }}:master
|
||||
cache-to: type=inline
|
||||
cache-from: ${{ env.CACHE_FROM }}
|
||||
cache-to: ${{ env.CACHE_TO }}
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
|
||||
AWS_SESSION_TOKEN: ${{ secrets.AWS_S3_SESSION_TOKEN }}
|
||||
-
|
||||
name: Inspect image
|
||||
run: |
|
||||
|
||||
6
.github/workflows/e2e.yml
vendored
6
.github/workflows/e2e.yml
vendored
@@ -25,6 +25,11 @@ jobs:
|
||||
name: Distribution
|
||||
id: distribution
|
||||
type: local
|
||||
-
|
||||
name: Distribution (s3 cache)
|
||||
id: distribution
|
||||
type: local
|
||||
cache: s3
|
||||
-
|
||||
name: Docker Hub
|
||||
registry: ''
|
||||
@@ -104,4 +109,5 @@ jobs:
|
||||
slug: ${{ matrix.slug }}
|
||||
username_secret: ${{ matrix.username_secret }}
|
||||
password_secret: ${{ matrix.password_secret }}
|
||||
cache: ${{ matrix.cache || 'registry' }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
||||
RUN apk add --no-cache ca-certificates go nodejs rust cargo
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
Reference in New Issue
Block a user