Skip to content

Commit

Permalink
feat: build only versions by minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Feb 11, 2024
1 parent debbe9d commit 4872a9f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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 }}
cache-from: type=gha,scope=${{ matrix.shopwareVersion }}
cache-to: type=gha,mode=max,scope=${{ matrix.shopwareVersion }}
platforms: linux/amd64
Expand Down
8 changes: 4 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 Down
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 4872a9f

Please sign in to comment.