diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0ef5bc..2367052 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: CMSSHOPIFYCONFIG__STOREFRONTAPIKEY: ${{ secrets.STOREFRONT_API_KEY }} CMSSHOPIFYCONFIG__STOREFRONTAPIVERSION: ${{ secrets.STOREFRONT_API_VERSION }} CMSSHOPIFYCONFIG__STOREPASSWORD: ${{ secrets.SHOPIFY_STORE_PASSWORD }} + XPERIENCE_BY_KENTICO_LICENSE: eyJEYXRhIjoie1x1MDAyMnRpZXJcdTAwMjI6XHUwMDIyQWR2YW5jZWRcdTAwMjIsXHUwMDIybGljZW5zZVx1MDAyMjpudWxsLFx1MDAyMmxpbWl0YXRpb25zXHUwMDIyOntcdTAwMjJjaGFubmVsc1x1MDAyMjo1LFx1MDAyMm1pY3JvQ2hhbm5lbHNcdTAwMjI6NX0sXHUwMDIya2V5XHUwMDIyOntcdTAwMjJpZFx1MDAyMjpcdTAwMjJlZjdmZTczZC1mNzI4LTQzOTYtOTQ3MS0yZGFhOTlkM2NlOWZcdTAwMjIsXHUwMDIydmVyc2lvblx1MDAyMjpcdTAwMjIxXHUwMDIyLFx1MDAyMmlzc3VlZERhdGVVdGNcdTAwMjI6XHUwMDIyMjAyNC0xMC0yMVQxMjoxMzo1My42NDA3NDczWlx1MDAyMixcdTAwMjJleHBpcmF0aW9uRGF0ZVV0Y1x1MDAyMjpcdTAwMjIyMDI1LTEwLTIwVDEyOjExOjAwWlx1MDAyMixcdTAwMjJ0eXBlXHUwMDIyOlx1MDAyMkRldmVsb3BtZW50XHUwMDIyLFx1MDAyMm5hbWVcdTAwMjI6XHUwMDIyS0VOVElDT19HSF9hY3Rpb25zXHUwMDIyLFx1MDAyMnN5bmNocm9uaXphdGlvblx1MDAyMjp0cnVlfX0iLCJTaWduYXR1cmUiOiJKRlhieTEwSjlTeDR6ZWFjZzR1YldSS3BSMldsOWlJXHUwMDJCWVZ2ZXNnN1BSeEE0ZGhIbXk3XHUwMDJCaXVtbk1JRXpKZmpQWGU1bC9cdTAwMkJMbjFOcXZTcVBDY0NaWjdaM1M1OFVKd3ZoWVdqVzI4ckRFL3FNaVNIM1M4V2lPYXd4anVUZ1Y2UmlaZDNNemloTEFFMFkxR1JUbDRodFlLOUFUZEpmQXk4NXFcdTAwMkJnVmJZaGpzc3dSaWttNzcwVm1jVWEvLzZSOFlYQ3hRMVJBTkZ4OU1sZlQxeVpQckl3UkhcdTAwMkJNaEFsUGN2b1RiTHNpNTRURW5LcTVSOTlIVGNTRkJcdTAwMkJ3VnBkNGF0bFRoVjZVM1hLQXV4Z2g4YjRcdTAwMkJiRnZ0L1o3UnFUZUY1bVx1MDAyQkJPdnFocWZyd1J4VnBER1dYaVQ4aXNTdjRpbTVXbjBHWXFmR3JHSXdcdTAwMkJOU3k5aW92NEw4VlVPOWM3cFE9PSJ9 steps: - uses: actions/checkout@v4 @@ -79,7 +80,6 @@ jobs: run: | dotnet build ` --configuration Release ` - --no-restore ` -p:XbyKVersion=* - name: Get Database Backup Name @@ -100,7 +100,6 @@ jobs: version: 2022 - name: Restore Database .bak - # TODO: Heslo v otevřené podobě? run: | docker exec sql mkdir /var/opt/mssql/backup docker cp "./database/${{ env.DATABASE_BACKUP_FILENAME }}" sql:/var/opt/mssql/backup @@ -112,17 +111,14 @@ jobs: -Q "RESTORE DATABASE [${{env.DB_NAME}}] FROM DISK='/var/opt/mssql/backup/${{ env.DATABASE_BACKUP_FILENAME }}' WITH MOVE 'XByK_DancingGoat_Shopify' TO '/var/opt/mssql/data/${{env.DB_NAME}}.mdf', MOVE 'XByK_DancingGoat_Shopify_log' TO '/var/opt/mssql/data/${{env.DB_NAME}}_log.ldf'" if: endsWith(env.DATABASE_BACKUP_FILENAME, '.bak') - - name: Restore Database .bacpac + - name: Import license key to DB run: | - sqlpackage ` - /a:Import ` - /tsn:localhost ` - /tdn:${{env.DB_NAME}} ` - /tu:sa ` - /tp:Pass@12345 ` - /sf:"./database/${{ env.DATABASE_BACKUP_FILENAME }}" ` - /tec:False - if: endsWith(env.DATABASE_BACKUP_FILENAME, '.bacpac') + sqlcmd ` + -S localhost ` + -d ${{env.DB_NAME}} ` + -U "sa" ` + -P "Pass@12345" ` + -Q "UPDATE CMS_SettingsKey SET KeyValue='${{ env.XPERIENCE_BY_KENTICO_LICENSE }}' WHERE KeyName='CMSLicenseKey'" - name: Restore CI Repository working-directory: "./scripts" @@ -197,6 +193,7 @@ jobs: Remove-Job -Name ${{ env.PROJECT_NAME }} - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} with: name: playwright-report path: ./test/Playwright/playwright-report/ diff --git a/database/XByK_DancingGoat_Shopify.bak.zip b/database/XByK_DancingGoat_Shopify.bak.zip index c66eb44..a14e8db 100644 Binary files a/database/XByK_DancingGoat_Shopify.bak.zip and b/database/XByK_DancingGoat_Shopify.bak.zip differ