|
6 | 6 |
|
7 | 7 | on: |
8 | 8 | push: |
9 | | - branches: |
10 | | - - master |
11 | | - - develop |
12 | | - - production |
13 | | - tags: |
14 | | - - '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-?*' |
15 | 9 |
|
16 | 10 | jobs: |
17 | 11 |
|
18 | 12 | test: |
19 | 13 | runs-on: ubuntu-22.04 |
20 | 14 | strategy: |
21 | 15 | matrix: |
22 | | - php-version: ['7.4','8.0','8.1','8.2'] |
| 16 | + php-version: ['7.4','8.0','8.1','8.2','8.3','8.4'] |
23 | 17 |
|
24 | 18 | steps: |
25 | 19 | - uses: actions/checkout@v3 |
26 | 20 |
|
27 | | - - name: Login to GitHub Container Registry |
28 | | - uses: docker/login-action@v2 |
29 | | - with: |
30 | | - registry: ghcr.io |
31 | | - username: ${{ github.repository_owner }} |
32 | | - password: ${{ secrets.GITHUB_TOKEN }} |
| 21 | +# - name: Login to GitHub Container Registry |
| 22 | +# uses: docker/login-action@v2 |
| 23 | +# with: |
| 24 | +# registry: ghcr.io |
| 25 | +# username: ${{ github.repository_owner }} |
| 26 | +# password: ${{ secrets.GITHUB_TOKEN }} |
33 | 27 |
|
34 | 28 | - name: Build docker image using Github Packages as cache |
35 | 29 | env: |
36 | 30 | PHP_VERSION: ${{ matrix.php-version }} |
37 | 31 | run: | |
38 | | - docker pull $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} || true |
39 | | - cd docker/$PHP_VERSION |
40 | | - docker build --build-arg PHP_VERSION=${PHP_VERSION} \ |
41 | | - --cache-from $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} \ |
| 32 | + docker build \ |
| 33 | + --file docker/Dockerfile \ |
| 34 | + --build-arg PHP_VERSION=${PHP_VERSION} \ |
42 | 35 | --tag $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} \ |
43 | | - --tag $DOCKER_REGISTRY_IMAGE:latest . |
44 | | - docker push $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} |
| 36 | + . |
45 | 37 |
|
46 | | - - name: Cache vendor folder |
47 | | - uses: actions/cache@v3 |
48 | | - with: |
49 | | - path: vendor |
50 | | - key: vendor-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }} |
| 38 | +# - name: Cache vendor folder |
| 39 | +# uses: actions/cache@v3 |
| 40 | +# with: |
| 41 | +# path: vendor |
| 42 | +# key: vendor-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }} |
51 | 43 |
|
52 | | - - name: Install dependencies |
53 | | - run: | |
54 | | - docker run --rm \ |
55 | | - -v $PWD:/var/www/html \ |
56 | | - $DOCKER_REGISTRY_IMAGE:${{ matrix.php-version }} \ |
57 | | - bash -c '\ |
58 | | - composer config -g github-oauth.github.com ${{ secrets.ACTIONS_TOKEN }} && \ |
59 | | - composer install --no-interaction --prefer-dist --no-scripts --no-cache' |
| 44 | +# - name: Install dependencies |
| 45 | +# run: | |
| 46 | +# docker run --rm \ |
| 47 | +# -v $PWD:/var/www/html \ |
| 48 | +# $DOCKER_REGISTRY_IMAGE:${{ matrix.php-version }} \ |
| 49 | +# bash -c '\ |
| 50 | +# composer config -g github-oauth.github.com ${{ secrets.ACTIONS_TOKEN }} && \ |
| 51 | +# composer install --no-interaction --prefer-dist --no-scripts --no-cache' |
60 | 52 |
|
61 | 53 |
|
62 | 54 | usx: |
63 | 55 | runs-on: ubuntu-22.04 |
64 | 56 | needs: test |
| 57 | + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' |
65 | 58 | steps: |
66 | 59 | - name: Checkout |
67 | 60 | uses: actions/checkout@v3 |
|
88 | 81 | eu2: |
89 | 82 | runs-on: ubuntu-22.04 |
90 | 83 | needs: test |
| 84 | + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' |
91 | 85 | steps: |
92 | 86 | - name: Checkout |
93 | 87 | uses: actions/checkout@v3 |
@@ -115,6 +109,7 @@ jobs: |
115 | 109 | us1: |
116 | 110 | runs-on: ubuntu-22.04 |
117 | 111 | needs: test |
| 112 | + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' |
118 | 113 | steps: |
119 | 114 | - name: Checkout |
120 | 115 | uses: actions/checkout@v3 |
|
0 commit comments