From 69bbc6d3c534eb71f19629d01abad69f04a050af Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Wed, 21 Sep 2022 10:23:03 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 64b7e2f..cc809b3 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ services: > docker-compose exec php-fpm /bin/bash > chown -R www-data:www-data /var/www/html/storage + > chmod -R 775 /var/www/html/storage > P.S. please give a star if you like it :wink: From 76653158b3ea59399c70799ec93b7ac94f4c8fe6 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Tue, 27 Sep 2022 20:31:52 +0200 Subject: [PATCH 2/2] Add Github action --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..90c9d29 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +name: ci + +on: + push: + branches: + - 'main' + - '8.1' + - '8.0' + - '7.4' + - '7.2' + pull_request: + branches: + - 'main' + - '8.1' + - '8.0' + - '7.4' + - '7.2' + +env: + #BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILDKIT_IMAGE: jkaninda/nginx-php-fpm +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Set environment for branch + run: | + set -x + if [[ $GITHUB_REF == 'refs/heads/main' ]]; then + echo "TAG_NAME=latest" >> "$GITHUB_ENV" + echo "runs-on: main branch" + else + echo "TAG_NAME=${{ github.head_ref || github.ref_name }}" >> "$GITHUB_ENV" + echo "runs-on: ${{ github.head_ref || github.ref_name }} branch" + fi + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: "${{env.BUILDKIT_IMAGE}}:${{env.TAG_NAME}}" \ No newline at end of file