Skip to content

Commit

Permalink
Merge master.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard-melnytskyi committed Dec 4, 2024
2 parents dc17bdd + 54de45e commit 8dad686
Show file tree
Hide file tree
Showing 22 changed files with 1,087 additions and 154 deletions.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## PR Description
Add a meaningful description here that will let us know what you want to fix with this PR or what functionality you want to add.

## Steps before you submit a PR
- Please add tests for the code you add if it's possible.
- Please check out our contribution guide: https://docs.spryker.com/docs/dg/dev/code-contribution-guide.html
- Add a `contribution-license-agreement.txt` file with the following content:
`I hereby agree to Spryker\'s Contribution License Agreement in https://github.com/spryker/docker-php/blob/HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH/CONTRIBUTING.md.`

This is a mandatory step to make sure you are aware of the license agreement and agree to it. `HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH` is a hash of the commit you are basing your branch from the master branch. You can take it from commits list of master branch before you submit a PR.

## Checklist
- [x] I agree with the Code Contribution License Agreement in CONTRIBUTING.md
63 changes: 50 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,16 @@ jobs:
matrix:
include:
## Alpine
### Alpine 3.16
- image: "alpine/3.16/8.0/Dockerfile"
tags: [ "spryker/php:8.0", "spryker/php:8.0-alpine3.16" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.16/8.1/Dockerfile"
tags: [ "spryker/php:8.1-alpine3.16" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.16/8.2/Dockerfile"
tags: [ "spryker/php:8.2-alpine3.16" ]
platforms: [ "linux/amd64", "linux/arm64" ]

### Alpine 3.17
- image: "alpine/3.17/8.1/Dockerfile"
tags: [ "spryker/php:8.1-alpine3.17" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.17/8.2/Dockerfile"
tags: [ "spryker/php:8.2-alpine3.17" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.17/8.3/Dockerfile"
tags: [ "spryker/php:8.3-alpine3.17" ]
platforms: [ "linux/amd64", "linux/arm64" ]

### Alpine 3.18
- image: "alpine/3.18/8.1/Dockerfile"
Expand All @@ -36,13 +28,30 @@ jobs:
- image: "alpine/3.18/8.2/Dockerfile"
tags: [ "spryker/php:8.2-alpine3.18" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.18/8.3/Dockerfile"
tags: [ "spryker/php:8.3-alpine3.18" ]
platforms: [ "linux/amd64", "linux/arm64" ]

### Alpine 3.19
- image: "alpine/3.19/8.1/Dockerfile"
tags: [ "spryker/php:8.1", "spryker/php:8.1-alpine3.19" ]
tags: [ "spryker/php:8.1-alpine3.19" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.19/8.2/Dockerfile"
tags: [ "spryker/php:latest", "spryker/php:8.2", "spryker/php:8.2-alpine3.19" ]
tags: [ "spryker/php:8.2-alpine3.19" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.19/8.3/Dockerfile"
tags: [ "spryker/php:8.3-alpine3.19" ]
platforms: [ "linux/amd64", "linux/arm64" ]

### Alpine 3.20
- image: "alpine/3.20/8.1/Dockerfile"
tags: [ "spryker/php:8.1", "spryker/php:8.1-alpine3.20" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.20/8.2/Dockerfile"
tags: [ "spryker/php:latest", "spryker/php:8.2", "spryker/php:8.2-alpine3.20" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.20/8.3/Dockerfile"
tags: [ "spryker/php:8.3", "spryker/php:8.3-alpine3.20" ]
platforms: [ "linux/amd64", "linux/arm64" ]

## Debian
Expand All @@ -56,7 +65,22 @@ jobs:
- image: "debian/bullseye/8.2/Dockerfile"
tags: [ "spryker/php:8.2-debian" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "debian/bullseye/8.3/Dockerfile"
tags: [ "spryker/php:8.3-debian" ]
platforms: [ "linux/amd64", "linux/arm64" ]
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get the previous commit hash
id: previous_commit
if: ${{ github.ref == 'refs/heads/master' }}
run: |
PREV_COMMIT_HASH=$(git rev-parse HEAD^1)
echo "PREV_COMMIT_HASH=$PREV_COMMIT_HASH" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand All @@ -69,6 +93,19 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Re-tag images with previous commit hash
if: ${{ github.ref == 'refs/heads/master' }}
run: |
PREV_HASH=${{ env.PREV_COMMIT_HASH }}
IMAGE_TAGS="${{ join(matrix.tags, ' ') }}"
for IMAGE_TAG in $IMAGE_TAGS; do
docker pull "$IMAGE_TAG"
NEW_TAG="${IMAGE_TAG}-${PREV_HASH}"
docker tag "$IMAGE_TAG" "$NEW_TAG"
echo "Re-tagged image: $NEW_TAG"
docker push $NEW_TAG
done
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- image: "alpine/3.17/8.2/Dockerfile"
tags: "8.2-alpine3.17"
platforms: "linux/amd64"
- image: "alpine/3.17/8.3/Dockerfile"
tags: "8.3-alpine3.17"
platforms: "linux/amd64"

### Alpine 3.18
- image: "alpine/3.18/8.1/Dockerfile"
Expand All @@ -30,6 +33,9 @@ jobs:
- image: "alpine/3.18/8.2/Dockerfile"
tags: "8.2-alpine3.18"
platforms: "linux/amd64"
- image: "alpine/3.18/8.3/Dockerfile"
tags: "8.3-alpine3.18"
platforms: "linux/amd64"

### Alpine 3.19
- image: "alpine/3.19/8.1/Dockerfile"
Expand All @@ -38,6 +44,20 @@ jobs:
- image: "alpine/3.19/8.2/Dockerfile"
tags: "8.2-alpine3.19"
platforms: "linux/amd64"
- image: "alpine/3.19/8.3/Dockerfile"
tags: "8.3-alpine3.19"
platforms: "linux/amd64"

### Alpine 3.20
- image: "alpine/3.20/8.1/Dockerfile"
tags: "8.1-alpine3.20"
platforms: "linux/amd64"
- image: "alpine/3.20/8.2/Dockerfile"
tags: "8.2-alpine3.20"
platforms: "linux/amd64"
- image: "alpine/3.20/8.3/Dockerfile"
tags: "8.3-alpine3.20"
platforms: "linux/amd64"

steps:
- name: Configure AWS credentials
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
utils.sh
.DS_Store
Loading

0 comments on commit 8dad686

Please sign in to comment.