del
This commit is contained in:
parent
263435318d
commit
86ab22ead8
134
.github/workflows/.e2e-run.yml
vendored
134
.github/workflows/.e2e-run.yml
vendored
@ -1,134 +0,0 @@
|
|||||||
# reusable workflow
|
|
||||||
name: .e2e-run
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
id:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
registry:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
slug:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
username_secret:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
password_secret:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env:
|
|
||||||
HARBOR_VERSION: v2.7.0
|
|
||||||
NEXUS_VERSION: 3.47.1
|
|
||||||
DISTRIBUTION_VERSION: 2.8.1
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
-
|
|
||||||
buildx_version: edge
|
|
||||||
buildkit_image: moby/buildkit:latest
|
|
||||||
-
|
|
||||||
buildx_version: latest
|
|
||||||
buildkit_image: moby/buildkit:buildx-stable-1
|
|
||||||
-
|
|
||||||
buildx_version: https://github.com/docker/buildx.git#master
|
|
||||||
buildkit_image: moby/buildkit:master
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up env
|
|
||||||
if: inputs.type == 'local'
|
|
||||||
run: |
|
|
||||||
cat ./.github/e2e/${{ inputs.id }}/env >> $GITHUB_ENV
|
|
||||||
-
|
|
||||||
name: Set up BuildKit config
|
|
||||||
run: |
|
|
||||||
touch /tmp/buildkitd.toml
|
|
||||||
if [ "${{ inputs.type }}" = "local" ]; then
|
|
||||||
echo -e "[registry.\"${{ env.REGISTRY_FQDN }}\"]\nhttp = true\ninsecure = true" > /tmp/buildkitd.toml
|
|
||||||
fi
|
|
||||||
-
|
|
||||||
name: Set up Docker daemon
|
|
||||||
if: inputs.type == 'local'
|
|
||||||
run: |
|
|
||||||
if [ ! -e /etc/docker/daemon.json ]; then
|
|
||||||
echo '{}' | sudo tee /etc/docker/daemon.json >/dev/null
|
|
||||||
fi
|
|
||||||
DOCKERD_CONFIG=$(jq '.+{"insecure-registries":["http://${{ env.REGISTRY_FQDN }}"]}' /etc/docker/daemon.json)
|
|
||||||
sudo tee /etc/docker/daemon.json <<<"$DOCKERD_CONFIG" >/dev/null
|
|
||||||
cat /etc/docker/daemon.json
|
|
||||||
sudo service docker restart
|
|
||||||
-
|
|
||||||
name: Install ${{ inputs.name }}
|
|
||||||
if: inputs.type == 'local'
|
|
||||||
run: |
|
|
||||||
sudo -E bash ./.github/e2e/${{ inputs.id }}/install.sh
|
|
||||||
sudo chown $(id -u):$(id -g) -R ~/.docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_SLUG || inputs.slug }}
|
|
||||||
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 }}
|
|
||||||
-
|
|
||||||
name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.buildx_version }}
|
|
||||||
buildkitd-config: /tmp/buildkitd.toml
|
|
||||||
buildkitd-flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
|
|
||||||
driver-opts: |
|
|
||||||
image=${{ matrix.buildkit_image }}
|
|
||||||
network=host
|
|
||||||
-
|
|
||||||
name: Login to Registry
|
|
||||||
if: github.event_name != 'pull_request' && (env.REGISTRY_USER || inputs.username_secret) != ''
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY_FQDN || inputs.registry }}
|
|
||||||
username: ${{ env.REGISTRY_USER || secrets[inputs.username_secret] }}
|
|
||||||
password: ${{ env.REGISTRY_PASSWORD || secrets[inputs.password_secret] }}
|
|
||||||
-
|
|
||||||
name: Build and push
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
context: ./test
|
|
||||||
file: ./test/multi.Dockerfile
|
|
||||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
|
||||||
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
|
|
||||||
-
|
|
||||||
name: Inspect image
|
|
||||||
run: |
|
|
||||||
docker pull ${{ env.REGISTRY_SLUG || inputs.slug }}:${{ steps.meta.outputs.version }}
|
|
||||||
docker image inspect ${{ env.REGISTRY_SLUG || inputs.slug }}:${{ steps.meta.outputs.version }}
|
|
||||||
-
|
|
||||||
name: Check manifest
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools inspect ${{ env.REGISTRY_SLUG || inputs.slug }}:${{ steps.meta.outputs.version }} --format '{{json .}}'
|
|
1596
.github/workflows/ci.yml
vendored
1596
.github/workflows/ci.yml
vendored
File diff suppressed because it is too large
Load Diff
107
.github/workflows/e2e.yml
vendored
107
.github/workflows/e2e.yml
vendored
@ -1,107 +0,0 @@
|
|||||||
name: e2e
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 10 * * *'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
uses: ./.github/workflows/.e2e-run.yml
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
-
|
|
||||||
name: Distribution
|
|
||||||
id: distribution
|
|
||||||
type: local
|
|
||||||
-
|
|
||||||
name: Docker Hub
|
|
||||||
registry: ''
|
|
||||||
slug: ghactionstest/ghactionstest
|
|
||||||
username_secret: DOCKERHUB_USERNAME
|
|
||||||
password_secret: DOCKERHUB_TOKEN
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: GitHub
|
|
||||||
registry: ghcr.io
|
|
||||||
slug: ghcr.io/docker-ghactiontest/test
|
|
||||||
username_secret: GHCR_USERNAME
|
|
||||||
password_secret: GHCR_PAT
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: GitLab
|
|
||||||
registry: registry.gitlab.com
|
|
||||||
slug: registry.gitlab.com/test1716/test
|
|
||||||
username_secret: GITLAB_USERNAME
|
|
||||||
password_secret: GITLAB_TOKEN
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: AWS ECR
|
|
||||||
registry: 175142243308.dkr.ecr.us-east-2.amazonaws.com
|
|
||||||
slug: 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action
|
|
||||||
username_secret: AWS_ACCESS_KEY_ID
|
|
||||||
password_secret: AWS_SECRET_ACCESS_KEY
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: AWS ECR Public
|
|
||||||
registry: public.ecr.aws
|
|
||||||
slug: public.ecr.aws/q3b5f1u4/test-docker-action
|
|
||||||
username_secret: AWS_ACCESS_KEY_ID
|
|
||||||
password_secret: AWS_SECRET_ACCESS_KEY
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: Google Artifact Registry
|
|
||||||
registry: us-east4-docker.pkg.dev
|
|
||||||
slug: us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action
|
|
||||||
username_secret: GAR_USERNAME
|
|
||||||
password_secret: GAR_JSON_KEY
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: Azure Container Registry
|
|
||||||
registry: officialgithubactions.azurecr.io
|
|
||||||
slug: officialgithubactions.azurecr.io/test-docker-action
|
|
||||||
username_secret: AZURE_CLIENT_ID
|
|
||||||
password_secret: AZURE_CLIENT_SECRET
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: Quay
|
|
||||||
registry: quay.io
|
|
||||||
slug: quay.io/docker_build_team/ghactiontest
|
|
||||||
username_secret: QUAY_USERNAME
|
|
||||||
password_secret: QUAY_TOKEN
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: Artifactory
|
|
||||||
registry: infradock.jfrog.io
|
|
||||||
slug: infradock.jfrog.io/test-ghaction/build-push-action
|
|
||||||
username_secret: ARTIFACTORY_USERNAME
|
|
||||||
password_secret: ARTIFACTORY_TOKEN
|
|
||||||
type: remote
|
|
||||||
-
|
|
||||||
name: Harbor
|
|
||||||
id: harbor
|
|
||||||
type: local
|
|
||||||
-
|
|
||||||
name: Nexus
|
|
||||||
id: nexus
|
|
||||||
type: local
|
|
||||||
with:
|
|
||||||
id: ${{ matrix.id }}
|
|
||||||
type: ${{ matrix.type }}
|
|
||||||
name: ${{ matrix.name }}
|
|
||||||
registry: ${{ matrix.registry }}
|
|
||||||
slug: ${{ matrix.slug }}
|
|
||||||
username_secret: ${{ matrix.username_secret }}
|
|
||||||
password_secret: ${{ matrix.password_secret }}
|
|
||||||
secrets: inherit
|
|
17
.github/workflows/pr-assign-author.yml
vendored
17
.github/workflows/pr-assign-author.yml
vendored
@ -1,17 +0,0 @@
|
|||||||
name: pr-assign-author
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@1b673f36fad86812f538c1df9794904038a23cbf
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
21
.github/workflows/publish.yml
vendored
21
.github/workflows/publish.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
name: publish
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Publish
|
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
|
32
.github/workflows/test.yml
vendored
32
.github/workflows/test.yml
vendored
@ -1,32 +0,0 @@
|
|||||||
name: test
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'releases/v*'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Test
|
|
||||||
uses: docker/bake-action@v6
|
|
||||||
with:
|
|
||||||
source: .
|
|
||||||
targets: test
|
|
||||||
-
|
|
||||||
name: Upload coverage
|
|
||||||
uses: codecov/codecov-action@v5
|
|
||||||
with:
|
|
||||||
files: ./coverage/clover.xml
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
43
.github/workflows/validate.yml
vendored
43
.github/workflows/validate.yml
vendored
@ -1,43 +0,0 @@
|
|||||||
name: validate
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'releases/v*'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
targets: ${{ steps.generate.outputs.targets }}
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: List targets
|
|
||||||
id: generate
|
|
||||||
uses: docker/bake-action/subaction/list-targets@v6
|
|
||||||
with:
|
|
||||||
target: validate
|
|
||||||
|
|
||||||
validate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target: ${{ fromJson(needs.prepare.outputs.targets) }}
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Validate
|
|
||||||
uses: docker/bake-action@v6
|
|
||||||
with:
|
|
||||||
targets: ${{ matrix.target }}
|
|
Loading…
x
Reference in New Issue
Block a user