Skip to content

Commit

Permalink
Merge branch 'main' into namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim authored Feb 11, 2024
2 parents 8d30cd6 + 27dc1be commit 9283c39
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo 'EOF' >> $GITHUB_OUTPUT
build:
name: ${{ matrix.shopwareVersion }}
name: "${{ matrix.minorShopwareVersion }} (${{ matrix.shopwareVersion }})"
runs-on: ubuntu-latest
needs: [generate-matrix]
strategy: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
Expand All @@ -50,7 +50,7 @@ jobs:

- uses: docker/build-push-action@v5
with:
tags: ghcr.io/friendsofshopware/shopware-demo-environment:${{ matrix.shopwareVersion }}
tags: ghcr.io/friendsofshopware/shopware-demo-environment:${{ matrix.minorShopwareVersion }}
platforms: linux/amd64,linux/arm64
build-args: |
PHP_VERSION=${{ matrix.phpVersion }}
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker run \
# External reachable URL, aka sales channel URL in shopware
-e APP_URL=http://localhost:8000 \
-p 8000:8000 \
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7.4
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7
```

[See here for all available images](https://github.com/FriendsOfShopware/shopware-demo-environment/pkgs/container/shopware-demo-environment/versions?filters%5Bversion_type%5D=tagged)
Expand All @@ -27,7 +27,7 @@ docker run \
-e APP_URL=http://localhost:8000 \
-e EXTENSIONS="frosh/tools" \
-p 8000:8000 \
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7.4
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7
```

For Shopware Store plugins, you need to pass the `SHOPWARE_PACKAGIST_TOKEN` environment variable generated from a Wildcard environment.
Expand All @@ -41,7 +41,7 @@ docker run \
-e EXTENSIONS="store.shopware.com/froshtools store.shopware.com/froshplatformsharebasket" \
-e SHOPWARE_PACKAGIST_TOKEN=your-token \
-p 8000:8000 \
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7.4
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7
```

## Running multiple containers
Expand All @@ -63,7 +63,7 @@ docker run \
-e EXTENSIONS="frosh/tools" \
-v $(pwd)/fixture.php:/var/www/html/fixture.php \
-p 8000:8000 \
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7.4
ghcr.io/friendsofshopware/shopware-demo-environment:6.5.7
```

```php
Expand All @@ -75,3 +75,7 @@ var_dump($kernel->getContainer()->get('product.repository')->getDefinition()->ge
```

and this script is executed on any container start, so you can use it to populate the database with custom data. All DI services are available in this script.

## Thanks to Namespace.so

Thanks to [namespace.so](https://namespace.so) for sponsoring their fast Docker builder with multi arch support. Checkout [namespace.so](https://namespace.so) if you need better GitHub runners or Docker remote builders.
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- letsencrypt:/letsencrypt
froshtools:
image: ghcr.io/friendsofshopware/shopware-demo-environment:6.5.8.2
image: ghcr.io/friendsofshopware/shopware-demo-environment:6.5.8
platform: linux/amd64
environment:
APP_URL: https://froshtools.localhost
Expand Down
9 changes: 6 additions & 3 deletions matrix.nu
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ def version_compare [a, b] {
}

let versions = http get https://raw.githubusercontent.com/FriendsOfShopware/shopware-static-data/main/data/php-version.json | items {|key, value|
{phpVersion: $value, shopwareVersion: ($key | str downcase)}
} | filter {|item|
let versionSplit = $key | split row "."
let version = [$versionSplit.0, $versionSplit.1, $versionSplit.2] | str join "."

{phpVersion: $value, shopwareVersion: ($key | str downcase), minorShopwareVersion: $version}
} | reverse | filter {|item|
version_compare $item.shopwareVersion "6.5.6"
}
} | uniq-by minorShopwareVersion

$data.matrix.include = $versions;

Expand Down

0 comments on commit 9283c39

Please sign in to comment.