Compare commits

..

1 Commits

Author SHA1 Message Date
CrazyMax
5ddb01429b ci(e2e): set oci-artifact
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-02 17:04:09 +02:00
5 changed files with 7 additions and 43 deletions

View File

@@ -76,7 +76,6 @@ until $(curl --output /dev/null --silent --head --fail "http://$NEXUS_HOST:$NEXU
printf '.' printf '.'
sleep 5 sleep 5
done done
echo "ready!"
echo "::endgroup::" echo "::endgroup::"
echo "::group::Change user's password" echo "::group::Change user's password"

View File

@@ -25,15 +25,11 @@ on:
password_secret: password_secret:
required: false required: false
type: string type: string
cache:
required: false
type: string
default: registry
env: env:
HARBOR_VERSION: v2.13.2 HARBOR_VERSION: v2.7.0
NEXUS_VERSION: 3.47.1 NEXUS_VERSION: 3.47.1
DISTRIBUTION_VERSION: 3.0.0 DISTRIBUTION_VERSION: 2.8.1
jobs: jobs:
run: run:
@@ -50,7 +46,7 @@ jobs:
buildkit_image: moby/buildkit:buildx-stable-1 buildkit_image: moby/buildkit:buildx-stable-1
- -
buildx_version: https://github.com/docker/buildx.git#master buildx_version: https://github.com/docker/buildx.git#master
buildkit_image: crazymax/buildkit:s3patch buildkit_image: moby/buildkit:master
steps: steps:
- -
name: Checkout name: Checkout
@@ -60,24 +56,6 @@ jobs:
if: inputs.type == 'local' if: inputs.type == 'local'
run: | run: |
cat ./.github/e2e/${{ inputs.id }}/env >> $GITHUB_ENV 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 name: Set up BuildKit config
run: | run: |
@@ -109,8 +87,6 @@ jobs:
with: with:
images: ${{ env.REGISTRY_SLUG || inputs.slug }} images: ${{ env.REGISTRY_SLUG || inputs.slug }}
tags: | tags: |
type=ref,event=branch,enable=${{ matrix.buildx_version == 'latest' && matrix.buildkit_image == 'moby/buildkit:buildx-stable-1' }}
type=ref,event=tag,enable=${{ matrix.buildx_version == 'latest' && matrix.buildkit_image == 'moby/buildkit:buildx-stable-1' }}
type=raw,gh-runid-${{ github.run_id }} type=raw,gh-runid-${{ github.run_id }}
- -
name: Set up QEMU name: Set up QEMU
@@ -140,15 +116,11 @@ jobs:
context: ./test context: ./test
file: ./test/multi.Dockerfile file: ./test/multi.Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: ${{ github.event_name != 'pull_request' }} outputs: type=image,oci-artifact=true,push=${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: ${{ env.CACHE_FROM }} cache-from: type=registry,ref=${{ env.REGISTRY_SLUG || inputs.slug }}:master
cache-to: ${{ env.CACHE_TO }} cache-to: type=inline
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 name: Inspect image
run: | run: |

View File

@@ -25,11 +25,6 @@ jobs:
name: Distribution name: Distribution
id: distribution id: distribution
type: local type: local
-
name: Distribution (s3 cache)
id: distribution
type: local
cache: s3
- -
name: Docker Hub name: Docker Hub
registry: '' registry: ''
@@ -109,5 +104,4 @@ jobs:
slug: ${{ matrix.slug }} slug: ${{ matrix.slug }}
username_secret: ${{ matrix.username_secret }} username_secret: ${{ matrix.username_secret }}
password_secret: ${{ matrix.password_secret }} password_secret: ${{ matrix.password_secret }}
cache: ${{ matrix.cache || 'registry' }}
secrets: inherit secrets: inherit

View File

@@ -131,7 +131,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v4
- -
name: Login to Docker Hub name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3

View File

@@ -1,6 +1,5 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build FROM --platform=$BUILDPLATFORM golang:alpine AS build
RUN apk add --no-cache ca-certificates go nodejs rust cargo
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG BUILDPLATFORM ARG BUILDPLATFORM