Skip to content

Commit

Permalink
style: reformat files with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Sep 19, 2024
1 parent 4460faa commit 8c71ec3
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .act/event.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"act": true
"act": true
}
2 changes: 1 addition & 1 deletion .github/actions/check-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
#language=bash
run: |
file=$(gh api "repos/$REPO/actions/artifacts" | jq ".artifacts[] | select(.name == \"$ARTIFACT_NAME\")")
if [ -n "$file" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "weekly"
interval: 'weekly'
34 changes: 17 additions & 17 deletions .github/workflows/build-elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ permissions:
packages: write

env:
DOCKER_BUILD_PLATFORMS: 'linux/amd64,linux/arm64'
DOCKER_CACHE_MODE: 'max'
DOCKER_CACHE_SOURCE: 'scope=build-' # Will be suffixed with matrix.es-version
DOCKER_CACHE_TARGET: 'scope=build-' # Will be suffixed with matrix.es-version
DOCKER_CACHE_TYPE: 'gha'
IMAGE: 'myparcel/elasticsearch'
DOCKER_BUILD_PLATFORMS: 'linux/amd64,linux/arm64'
DOCKER_CACHE_MODE: 'max'
DOCKER_CACHE_SOURCE: 'scope=build-' # Will be suffixed with matrix.es-version
DOCKER_CACHE_TARGET: 'scope=build-' # Will be suffixed with matrix.es-version
DOCKER_CACHE_TYPE: 'gha'
IMAGE: 'myparcel/elasticsearch'
UBUNTU_DISTRIB_CODENAME: 'focal'
#language=json
ES_MATRIX: |-
Expand All @@ -41,7 +41,7 @@ env:
jobs:
set-matrix:
runs-on: ubuntu-22.04
outputs: { matrix: '${{ steps.set-matrix.outputs.matrix }}' }
outputs: {matrix: '${{ steps.set-matrix.outputs.matrix }}'}
steps:
- id: set-matrix
#language=bash
Expand All @@ -59,20 +59,20 @@ jobs:

# Login to the Docker Hub
- uses: docker/login-action@v2
if: ${{ !env.ACT }} # Don't run when using `act`.
if: ${{ !env.ACT }} # Don't run when using `act`.
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Setup QEMU for cross-architecture builds
- uses: docker/setup-qemu-action@v2
if: ${{ !env.ACT }} # Don't run when using `act`.
if: ${{ !env.ACT }} # Don't run when using `act`.

- uses: docker/setup-buildx-action@v2

- uses: docker/metadata-action@v3
id: meta
if: ${{ !env.ACT }} # Don't run when using `act`.
if: ${{ !env.ACT }} # Don't run when using `act`.
with:
images: ${{ env.IMAGE }}
tags: |
Expand All @@ -81,24 +81,24 @@ jobs:
type=raw,value=${{ matrix.es-major }},enable=${{ github.ref == 'refs/heads/main' && matrix.es-major != '' }}
type=raw,value=${{ matrix.es-minor }},enable=${{ github.ref == 'refs/heads/main' && matrix.es-minor != '' }}
type=raw,value=${{ matrix.es-version }},enable=${{ github.ref == 'refs/heads/main' }}
# Tags for branches, tags and pull requests
type=ref,event=branch,suffix=-${{ matrix.es-version }},enable=${{ github.ref != 'refs/heads/main' }}
type=ref,event=tag,suffix=-${{ matrix.es-version }}
type=ref,event=pr,suffix=-${{ matrix.es-version }}
- uses: docker/build-push-action@v3
with:
context: images/elasticsearch
context: images/elasticsearch
build-args: |
ES_VERSION=${{ matrix.es-version }}
UBUNTU_DISTRIB_CODENAME=${{ env.UBUNTU_DISTRIB_CODENAME }}
tags: ${{ steps.meta.outputs.tags }}
push: ${{ env.ACT != 'true' }} # Don't push when using `act`,
load: ${{ env.ACT == 'true' }} # instead load the image into the Docker daemon.
platforms: ${{ env.DOCKER_BUILD_PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
push: ${{ env.ACT != 'true' }} # Don't push when using `act`,
load: ${{ env.ACT == 'true' }} # instead load the image into the Docker daemon.
platforms: ${{ env.DOCKER_BUILD_PLATFORMS }}
cache-from: type=${{ env.DOCKER_CACHE_TYPE }},${{ env.DOCKER_CACHE_SOURCE }}${{ matrix.es-version }}
cache-to: type=${{ env.DOCKER_CACHE_TYPE }},${{ env.DOCKER_CACHE_TARGET }}${{ matrix.es-version }},mode=${{ env.DOCKER_CACHE_MODE }}
cache-to: type=${{ env.DOCKER_CACHE_TYPE }},${{ env.DOCKER_CACHE_TARGET }}${{ matrix.es-version }},mode=${{ env.DOCKER_CACHE_MODE }}

notify-on-failure:
needs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-php-xd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1' ]
alpine: [ '3.12', '3.13', '3.14', '3.15', '3.16', '3.17', '3.18', '' ]
type: [ '-fpm', '-cli', '' ]
php: ['8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1']
alpine: ['3.12', '3.13', '3.14', '3.15', '3.16', '3.17', '3.18', '']
type: ['-fpm', '-cli', '']
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-prestashop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
ps7_versions=$(echo "$versions" | jq -c 'map(select(. | startswith("1.7")))')
ps8_versions=$(echo "$versions" | jq -c 'map(select(. | startswith("8")))')
echo "ps7-matrix=$ps7_versions" >> $GITHUB_OUTPUT
echo "ps8-matrix=$ps8_versions" >> $GITHUB_OUTPUT
Expand All @@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.4', '7.1' ]
php: ['7.4', '7.1']
ps: ${{ fromJson(needs.prepare.outputs.ps7-matrix) }}
steps:
- uses: actions/checkout@v3
Expand All @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.1' ]
php: ['8.2', '8.1']
ps: ${{ fromJson(needs.prepare.outputs.ps8-matrix) }}
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-shopware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2' ]
sw: [ '6.5.0.0' ]
php: ['8.1', '8.2']
sw: ['6.5.0.0']
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.2', '7.4' ]
php: ['8.2', '7.4']
wp: ${{ fromJSON(needs.prepare-wp.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
#language=bash
run: |
gh workflow run "build-$IMAGE.yml"
echo "Job 'build-$IMAGE' dispatched."
- name: 'Release the lock'
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/config/elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cluster.name: "docker-cluster"
cluster.name: 'docker-cluster'
network.host: 0.0.0.0
48 changes: 30 additions & 18 deletions images/elasticsearch/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
services:
elasticsearch:
image: "myparcel/elasticsearch:${DOCKER_TAG:?6.8.23}"
image: 'myparcel/elasticsearch:${DOCKER_TAG:?6.8.23}'
build:
context: ./
args: { ES_VERSION: "${ES_VERSION:?6.8.23}" }
platforms: [ linux/amd64, linux/arm64 ]
context: ./
args: {ES_VERSION: '${ES_VERSION:?6.8.23}'}
platforms: [linux/amd64, linux/arm64]
x-bake:
platforms: [ linux/amd64, linux/arm64 ]
platforms: [linux/amd64, linux/arm64]
environment:
ES_HEAP_SIZE: "1024m"
ES_JAVA_OPTS: "-Xms1024m -Xmx1024m -Dlog4j2.formatMsgNoLookups=true"
ES_HEAP_SIZE: '1024m'
ES_JAVA_OPTS: '-Xms1024m -Xmx1024m -Dlog4j2.formatMsgNoLookups=true'
bootstrap.memory_lock: 'true'
discovery.type: "single-node"
path.repo: &repo-path "/usr/share/elasticsearch/repo"
discovery.type: 'single-node'
path.repo: &repo-path '/usr/share/elasticsearch/repo'
healthcheck:
test: ['CMD-SHELL', 'curl -s -f http://localhost:9200/_cluster/health?wait_for_status=green || exit 1']
test:
[
'CMD-SHELL',
'curl -s -f http://localhost:9200/_cluster/health?wait_for_status=green || exit 1',
]
interval: 30s
timeout: 5s
timeout: 5s
start_period: 30s
retries: 3
retries: 3
ulimits:
memlock: { soft: -1, hard: -1 }
nofile: { soft: 65536, hard: 65536 }
nproc: 65535
memlock: {soft: -1, hard: -1}
nofile: {soft: 65536, hard: 65536}
nproc: 65535
volumes:
- { type: volume, source: elasticsearch-data, target: /usr/share/elasticsearch/data }
- { type: volume, source: elasticsearch-repo, target: *repo-path }
- { type: bind, source: ./logs, target: /usr/share/elasticsearch/logs:cached }
- {
type: volume,
source: elasticsearch-data,
target: /usr/share/elasticsearch/data,
}
- {type: volume, source: elasticsearch-repo, target: *repo-path}
- {
type: bind,
source: ./logs,
target: /usr/share/elasticsearch/logs:cached,
}

volumes:
elasticsearch-data:
Expand Down

0 comments on commit 8c71ec3

Please sign in to comment.