Merge branch 'master' into fork/ThaDaVos/master
This commit is contained in:
commit
675c0e0a1a
2 changed files with 53 additions and 5 deletions
37
.github/workflows/build.yml
vendored
37
.github/workflows/build.yml
vendored
|
|
@ -77,14 +77,39 @@ jobs:
|
||||||
result = []
|
result = []
|
||||||
tags.split("\n").forEach(function (item) {
|
tags.split("\n").forEach(function (item) {
|
||||||
short_tag = item.trim().split(":")[1];
|
short_tag = item.trim().split(":")[1];
|
||||||
if (short_tag != "latest") {
|
if (short_tag == "master" || short_tag == "main") {
|
||||||
|
result.push("latest");
|
||||||
|
} else if (short_tag != "latest") {
|
||||||
result.push(short_tag);
|
result.push(short_tag);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return result.join(",");
|
return result.join(",");
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
- name: Get result
|
|
||||||
run: echo "${{ steps.tags.outputs.result }}"
|
- name: Get Tags
|
||||||
|
run: |
|
||||||
|
echo "${{ steps.tags.outputs.result }}"
|
||||||
|
|
||||||
|
- uses: actions/github-script@v6
|
||||||
|
id: normalized
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
tags = `${{ join(steps.meta.outputs.tags, ',') }}`
|
||||||
|
result = []
|
||||||
|
tags.split("\n").forEach(function (item) {
|
||||||
|
short_tag = item.trim().split(":")[1];
|
||||||
|
if (short_tag == "master" || short_tag == "main") {
|
||||||
|
result.push("${{ env.IMAGE_NAME }}:latest");
|
||||||
|
} else if (short_tag != "latest") {
|
||||||
|
result.push("${{ env.IMAGE_NAME }}:" + short_tag);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return result.join(",");
|
||||||
|
result-encoding: string
|
||||||
|
|
||||||
|
- name: Get Normalized Docker Image
|
||||||
|
run: |
|
||||||
|
echo "${{ steps.normalized.outputs.result }}"
|
||||||
|
|
||||||
# Build and push Docker image with Buildx (don't push on PR)
|
# Build and push Docker image with Buildx (don't push on PR)
|
||||||
# https://github.com/docker/build-push-action
|
# https://github.com/docker/build-push-action
|
||||||
|
|
@ -97,7 +122,7 @@ jobs:
|
||||||
RELEASE_VERSION_ARG="${{ steps.tags.outputs.result }}"
|
RELEASE_VERSION_ARG="${{ steps.tags.outputs.result }}"
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }}
|
push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.normalized.outputs.result }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
|
|
@ -136,7 +161,9 @@ jobs:
|
||||||
CURRENT_VERSION=$(grep "appVersion: " helm/easyhaproxy/Chart.yaml | sed 's#appVersion: "\(.*\)"#\1#g')
|
CURRENT_VERSION=$(grep "appVersion: " helm/easyhaproxy/Chart.yaml | sed 's#appVersion: "\(.*\)"#\1#g')
|
||||||
|
|
||||||
if [ "$TAG" = "$CURRENT_VERSION" ]; then
|
if [ "$TAG" = "$CURRENT_VERSION" ]; then
|
||||||
echo "Skipping update version..."
|
echo "Skipping version $CURRENT_VERSION..."
|
||||||
|
elif [ "$TAG" = "latest" ]; then
|
||||||
|
echo "Skipping latest version..."
|
||||||
else
|
else
|
||||||
sed -i "s#easy-haproxy:[a-zA-Z0-9\.-]*#easy-haproxy:$TAG#g" deploy/docker/docker-compose.yml
|
sed -i "s#easy-haproxy:[a-zA-Z0-9\.-]*#easy-haproxy:$TAG#g" deploy/docker/docker-compose.yml
|
||||||
sed -i "s#version: \"[a-zA-Z0-9\.-]*\"#version: \"$TAG\"#g" deploy/kubernetes/easyhaproxy-*.yml
|
sed -i "s#version: \"[a-zA-Z0-9\.-]*\"#version: \"$TAG\"#g" deploy/kubernetes/easyhaproxy-*.yml
|
||||||
|
|
|
||||||
21
.run/pytest in tests.run.xml
Normal file
21
.run/pytest in tests.run.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="pytest in tests" type="tests" factoryName="py.test" nameIsGenerated="true">
|
||||||
|
<module name="docker-easy-haproxy" />
|
||||||
|
<option name="ENV_FILES" value="" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="SDK_NAME" value="Python 3.12 (docker-easy-haproxy)" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
|
||||||
|
<option name="IS_MODULE_SDK" value="false" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="_new_keywords" value="""" />
|
||||||
|
<option name="_new_parameters" value="""" />
|
||||||
|
<option name="_new_additionalArguments" value="""" />
|
||||||
|
<option name="_new_target" value=""$PROJECT_DIR$/src/tests"" />
|
||||||
|
<option name="_new_targetType" value=""PATH"" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue