|
|
|
@ -25,6 +25,10 @@ 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.13.2
|
|
|
|
@ -56,6 +60,24 @@ 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}`);
|
|
|
|
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
name: Set up BuildKit config
|
|
|
|
name: Set up BuildKit config
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
@ -121,8 +143,12 @@ jobs:
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
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: type=registry,ref=${{ env.REGISTRY_SLUG || inputs.slug }}:master
|
|
|
|
cache-from: ${{ env.CACHE_FROM }}
|
|
|
|
cache-to: type=inline
|
|
|
|
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
|
|
|
|
name: Inspect image
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
|