|
| 1 | +name: Manifest |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '*' |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + updateManifest: |
| 11 | + name: Update manifest |
| 12 | + runs-on: ubuntu-latest |
| 13 | + env: |
| 14 | + phpVersion: '8.0' |
| 15 | + extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip |
| 16 | + key: winter-cms-cache-develop |
| 17 | + steps: |
| 18 | + - name: Cancel previous incomplete runs |
| 19 | + |
| 20 | + with: |
| 21 | + access_token: ${{ github.token }} |
| 22 | + |
| 23 | + - name: Checkout changes |
| 24 | + uses: actions/checkout@v3 |
| 25 | + |
| 26 | + - name: Setup extension cache |
| 27 | + id: extcache |
| 28 | + uses: shivammathur/cache-extensions@v1 |
| 29 | + with: |
| 30 | + php-version: ${{ env.phpVersion }} |
| 31 | + extensions: ${{ env.extensions }} |
| 32 | + key: ${{ env.key }} |
| 33 | + |
| 34 | + - name: Cache extensions |
| 35 | + uses: actions/cache@v3 |
| 36 | + with: |
| 37 | + path: ${{ steps.extcache.outputs.dir }} |
| 38 | + key: ${{ steps.extcache.outputs.key }} |
| 39 | + restore-keys: ${{ steps.extcache.outputs.key }} |
| 40 | + |
| 41 | + - name: Install PHP |
| 42 | + uses: shivammathur/setup-php@v2 |
| 43 | + with: |
| 44 | + php-version: ${{ env.phpVersion }} |
| 45 | + extensions: ${{ env.extensions }} |
| 46 | + |
| 47 | + - name: Setup dependency cache |
| 48 | + id: composercache |
| 49 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 50 | + |
| 51 | + - name: Cache dependencies |
| 52 | + uses: actions/cache@v3 |
| 53 | + with: |
| 54 | + path: ${{ steps.composercache.outputs.dir }} |
| 55 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} |
| 56 | + restore-keys: ${{ runner.os }}-composer- |
| 57 | + |
| 58 | + - name: Install Composer dependencies |
| 59 | + run: composer install --no-interaction --no-progress --no-scripts |
| 60 | + |
| 61 | + - name: Download manifest |
| 62 | + run: wget -O builds.json https://github.com/wintercms/meta/raw/master/manifest/builds.json |
| 63 | + |
| 64 | + - name: Run manifest |
| 65 | + run: php artisan winter:manifest builds.json |
| 66 | + |
| 67 | + - name: Create artifact |
| 68 | + uses: actions/upload-artifact@v3 |
| 69 | + with: |
| 70 | + name: winter-manifest |
| 71 | + path: builds.json |
0 commit comments