-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
68 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: GitHub Actions | ||
|
||
on: push | ||
|
||
env: | ||
REPO: lazerg/laravel | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run build script | ||
run: chmod +x ./build.sh && ./build.sh |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# Login to Docker registry | ||
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" | ||
|
||
# Array of PHP versions | ||
versions=(8.0.30 8.1.29 8.2.20 8.3.8) | ||
|
||
# Iterate through each version | ||
for version in "${versions[@]}"; do | ||
# Extract major and minor version for image tag | ||
major_minor=$(echo "$version" | cut -d '.' -f1,2 | tr -d '.') | ||
|
||
# Define repository name | ||
REPOSITORY="${REPO}:php$major_minor" | ||
|
||
# Build and push image without xdebug | ||
docker build . --file php.Dockerfile \ | ||
--build-arg PHP_VERSION="$version" \ | ||
--build-arg NODE_VERSION=20 \ | ||
--build-arg WITH_XDEBUG=false \ | ||
--no-cache \ | ||
--tag "$REPOSITORY" \ | ||
--push | ||
|
||
# Build and push image with xdebug | ||
docker build . --file php.Dockerfile \ | ||
--build-arg PHP_VERSION="$version" \ | ||
--build-arg NODE_VERSION=20 \ | ||
--build-arg WITH_XDEBUG=true \ | ||
--no-cache \ | ||
--tag "$REPOSITORY"-xdebug \ | ||
--push | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.