66
77on :
88 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]-?*'
159
1610jobs :
1711
@@ -24,26 +18,23 @@ jobs:
2418 steps :
2519 - uses : actions/checkout@v3
2620
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 }}
3327
3428 - name : Build docker image using Github Packages as cache
3529 env :
3630 PHP_VERSION : ${{ matrix.php-version }}
3731 run : |
38- docker pull $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} || true
39- cd docker
4032 docker build \
4133 --file docker/Dockerfile \
4234 --build-arg PHP_VERSION=${PHP_VERSION} \
4335 --cache-from $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} \
4436 --tag $DOCKER_REGISTRY_IMAGE:${PHP_VERSION} \
4537 --tag $DOCKER_REGISTRY_IMAGE:latest .
46- docker push $DOCKER_REGISTRY_IMAGE:${PHP_VERSION}
4738
4839# - name: Cache vendor folder
4940# uses: actions/cache@v3
6455 usx :
6556 runs-on : ubuntu-22.04
6657 needs : test
58+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
6759 steps :
6860 - name : Checkout
6961 uses : actions/checkout@v3
9082 eu2 :
9183 runs-on : ubuntu-22.04
9284 needs : test
85+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
9386 steps :
9487 - name : Checkout
9588 uses : actions/checkout@v3
@@ -117,6 +110,7 @@ jobs:
117110 us1 :
118111 runs-on : ubuntu-22.04
119112 needs : test
113+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
120114 steps :
121115 - name : Checkout
122116 uses : actions/checkout@v3
0 commit comments