forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
248 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: Build and push OCI images | ||
description: Build and push OCI images with kaniko. Almost drop in replacement for docker/build-push-action | ||
author: shopware | ||
branding: | ||
icon: "anchor" | ||
color: "blue" | ||
|
||
inputs: | ||
build-args: | ||
description: "List of build-time variables" | ||
required: false | ||
context: | ||
description: "Build's context is the set of files located in the specified PATH or URL" | ||
required: false | ||
file: | ||
description: "Path to the Dockerfile" | ||
required: false | ||
labels: | ||
description: "List of metadata for an image" | ||
required: false | ||
no-cache: | ||
description: "Do not use cache when building the image" | ||
required: false | ||
default: "false" | ||
platforms: | ||
description: "List of target platforms for build" | ||
required: false | ||
provenance: | ||
description: "Generate provenance attestation for the build (shorthand for --attest=type=provenance)" | ||
required: false | ||
pull: | ||
description: "Always attempt to pull all referenced images" | ||
required: false | ||
default: "false" | ||
push: | ||
description: "Push is a shorthand for --output=type=registry" | ||
required: false | ||
default: "false" | ||
secrets: | ||
description: "List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)" | ||
required: false | ||
secret-envs: | ||
description: "List of secret env vars to expose to the build (e.g., key=envname, MY_SECRET=MY_ENV_VAR)" | ||
required: false | ||
secret-files: | ||
description: "List of secret files to expose to the build (e.g., key=filename, MY_SECRET=./secret.txt)" | ||
required: false | ||
tags: | ||
description: "List of tags" | ||
required: false | ||
target: | ||
description: "Sets the target stage to build" | ||
required: false | ||
github-token: | ||
description: "GitHub Token used to authenticate against a repository for Git context" | ||
default: ${{ github.token }} | ||
required: false | ||
|
||
# not supported (yet) | ||
|
||
annotations: | ||
description: "List of annotation to set to the image" | ||
required: false | ||
attests: | ||
description: "List of attestation parameters (e.g., type=sbom,generator=image)" | ||
required: false | ||
add-hosts: | ||
description: "List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)" | ||
required: false | ||
allow: | ||
description: "List of extra privileged entitlement (e.g., network.host,security.insecure)" | ||
required: false | ||
build-contexts: | ||
description: "List of additional build contexts (e.g., name=path)" | ||
required: false | ||
builder: | ||
description: "Builder instance" | ||
required: false | ||
cache-from: | ||
description: "List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)" | ||
required: false | ||
cache-to: | ||
description: "List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir)" | ||
required: false | ||
cgroup-parent: | ||
description: "Optional parent cgroup for the container used in the build" | ||
required: false | ||
network: | ||
description: "Set the networking mode for the RUN instructions during build" | ||
required: false | ||
no-cache-filters: | ||
description: "Do not cache specified stages" | ||
required: false | ||
load: | ||
description: "Load is a shorthand for --output=type=docker" | ||
required: false | ||
default: "false" | ||
outputs: | ||
description: "List of output destinations (format: type=local,dest=path)" | ||
required: false | ||
sbom: | ||
description: "Generate SBOM attestation for the build (shorthand for --attest=type=sbom)" | ||
required: false | ||
shm-size: | ||
description: "Size of /dev/shm (e.g., 2g)" | ||
required: false | ||
ssh: | ||
description: "List of SSH agent socket or keys to expose to the build" | ||
required: false | ||
ulimit: | ||
description: "Ulimit options (e.g., nofile=1024:1024)" | ||
required: false | ||
|
||
outputs: | ||
imageid: | ||
description: "Image ID" | ||
digest: | ||
description: "Image digest" | ||
metadata: | ||
description: "Build result metadata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$(dirname ${BASH_SOURCE[0]})/../.gitlab/bin/split.sh" | ||
|
||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then | ||
set -o errexit | ||
set -o pipefail | ||
|
||
if [ -n "${DEBUG:-}" ]; then | ||
set -x | ||
fi | ||
|
||
PLATFORM_DIR="${CI_PROJECT_DIR:-$(pwd)}" | ||
|
||
"$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Prepare release | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# if: github.repository == 'shopware/shopware' | ||
# container: | ||
# image: ghcr.io/catthehacker/ubuntu:act-22.04 | ||
env: | ||
SHOPWARE_ADMIN_SKIP_SOURCEMAP_GENERATION: "1" | ||
DATABASE_URL: mysql://root:[email protected]:3306/root | ||
services: | ||
database: | ||
image: mysql:8.0 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: root | ||
options: '--mount="type=tmpfs,destination=/var/lib/mysql" --health-cmd="mysqladmin ping -h 127.0.0.1" --health-interval=5s --health-timeout=2s --health-retries=3' | ||
ports: | ||
- "3306:3306" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
fetch-tags: 'true' | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
coverage: none | ||
extensions: gd, xml, dom, curl, pdo, mysqli, mbstring, pdo_mysql, bcmath | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: build shopware | ||
run: | | ||
composer setup | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: context | ||
path: | | ||
. | ||
!public | ||
!**/node_modules | ||
!vendor | ||
!vendor-bin | ||
split: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
package: [ Administration, Storefront, Core, Elasticsearch ] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: context | ||
- name: debug platform | ||
run: | | ||
git log -n 10 | ||
- name: split | ||
run: | | ||
bash .github/split.bash split_repo "${{ matrix.package }}" | ||
- name: debug 1 | ||
run: | | ||
P=${{ matrix.package }} | ||
git -C repos/${P@L} log -n 10 | ||
- name: Incldue assets | ||
run: | | ||
bash .gitlab/bin/split.sh include_assets "${{ matrix.package }}" | ||
# split into packages | ||
# build js apps | ||
# push split packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters