Nightly #70
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
name: Nightly | |
on: | |
schedule: | |
- cron: "0 1 * * *" # every day at 01:00 | |
workflow_dispatch: | |
jobs: | |
clean-ghcr: | |
name: Delete old unused container images | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Collect skipped SHAs | |
id: skip-sha | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
result="skip-sha=" | |
while read tag; do | |
docker_manifest=$(docker manifest inspect ghcr.io/shopware/shopware/ci-e2e:${tag} 2>&1 || true) | |
# If the image does not exist or an error happens | |
if ! jq '.' <<<"${docker_manifest}" > /dev/null 2>&1; then | |
echo "${tag}: ${docker_manifest}" | |
continue | |
fi | |
# Only collect the shas of multi-arch images | |
if [[ $(jq -r '.manifests | length' <<<"${docker_manifest}") -gt 0 ]]; then | |
result="${result}$(jq -r '.manifests[] | .digest' <<<"${docker_manifest}" | paste -s -d ',' -)," | |
fi | |
done<<<$(gh api '/orgs/shopware/packages/container/shopware%2Fci-e2e/versions?per_page=100' --jq '.[] | .metadata.container.tags[] | select(. == "latest" or . == "trunk" or . == "6.5.x" or startswith("v"))') | |
echo "${result}" >> "${GITHUB_OUTPUT}" | |
- name: Delete old images | |
uses: snok/[email protected] | |
with: | |
account: shopware | |
token: ${{ github.token }} | |
cut-off: 2d | |
image-names: ${{ github.event.repository.name }}/ci-e2e | |
image-tags: "!latest, !trunk, !6.5.x, !v*" | |
skip-shas: ${{ steps.skip-sha.outputs.skip-sha }} | |
keep-n-most-recent: 1 | |
dry-run: ${{ env.ACT && true || false }} | |
redis: | |
name: Redis | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
redis: | |
- redis:alpine | |
- eqalpha/keydb:latest | |
- valkey/valkey:8.0 | |
services: | |
redis: | |
image: ${{ matrix.redis }} | |
ports: | |
- "6379:6379" | |
env: | |
REDIS_URL: redis://localhost:6379 | |
COMPOSER_ROOT_VERSION: 6.6.9999999-dev | |
steps: | |
- name: Setup Shopware | |
uses: shopware/setup-shopware@main | |
with: | |
shopware-version: ${{ github.ref }} | |
shopware-repository: ${{ github.repository }} | |
- name: Run PHPUnit | |
run: | | |
./vendor/bin/phpunit --group=redis | |
admin: | |
uses: ./.github/workflows/admin.yml | |
secrets: inherit | |
integration: | |
uses: ./.github/workflows/integration.yml | |
secrets: inherit | |
php: | |
uses: ./.github/workflows/php.yml | |
secrets: inherit | |
storefront: | |
uses: ./.github/workflows/storefront.yml | |
secrets: inherit | |
downstream: | |
uses: ./.github/workflows/downstream.yml | |
secrets: inherit | |
with: | |
nightly: true | |