This repository was archived by the owner on Nov 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·93 lines (81 loc) · 3.54 KB
/
entrypoint.sh
File metadata and controls
executable file
·93 lines (81 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/sh -l
echo ""
echo "=========================================================================================================="
echo "⚠️ DEPRECATION WARNING: This action is deprecated and will no longer receive updates."
echo "=========================================================================================================="
echo ""
echo "Please migrate to the official Docker GitHub Actions for better support and features:"
echo ""
echo " 1. docker/setup-buildx-action - https://github.com/docker/setup-buildx-action"
echo " 2. docker/metadata-action - https://github.com/docker/metadata-action"
echo " 3. docker/build-push-action - https://github.com/docker/build-push-action"
echo ""
echo "For SBOM and provenance attestations, use the built-in support in docker/build-push-action:"
echo " - Documentation: https://docs.docker.com/build/ci/github-actions/attestations/"
echo ""
echo "See the README for a complete migration example:"
echo " - https://github.com/philips-software/docker-ci-scripts#readme"
echo ""
echo "=========================================================================================================="
echo ""
# Output deprecation warning as GitHub Actions annotation
echo "::warning file=entrypoint.sh,line=1,title=Action Deprecated::This action is deprecated and will no longer receive updates. Please migrate to the official Docker actions: docker/setup-buildx-action, docker/metadata-action, and docker/build-push-action. See https://github.com/philips-software/docker-ci-scripts#readme for migration guide."
if [ -n "${SLSA_PROVENANCE}" ]
then
echo "+ SLSA Provenance ---------"
echo "| Installing slsa provenance"
. $GITHUB_ACTION_PATH/scripts/install_slsa_provenance.sh
echo "| Show slsa provenance version"
slsa-provenance version
echo "| Finished installing slsa-provenance"
echo "- SLSA Provenance ---------"
fi
if [ -n "${SIGN}" ]
then
echo "+ Cosign ------------------"
echo "| Installing cosign"
$GITHUB_ACTION_PATH/scripts/install_cosign.sh
export PATH=${HOME}/.cosign:$PATH
echo "| Show cosign version"
cosign version
echo "| Finished installing cosign"
echo "- Cosign ------------------"
fi
if [ -n "${SBOM}" ]
then
echo "+ SBOM -------------------"
echo "| Installing Syft"
. $GITHUB_ACTION_PATH/scripts/install_syft.sh
echo "| Show Syft version"
syft version
echo "| Finished installing Syft"
echo "- Syft -------------------"
fi
if [ "${PUSH_ON_GIT_TAG}" = true ]
then
echo "+ PUSH_ON_GIT_TAG -------------------"
echo "| Push on git tag flag is set to true."
echo "- PUSH_ON_GIT_TAG -------------------"
fi
echo "dockerfile : $1"
echo "image name : $2"
echo "tags : $3"
echo "push branches : $4"
echo "base dir : $5"
export PUSH_BRANCHES="$4"
if [ -n "${DOCKER_USERNAME}" ]; then
echo "ERROR: DOCKER_USERNAME is replaced by REGISTRY_USERNAME. Please update scripts."
echo "ERROR: DOCKER_USERNAME is replaced by REGISTRY_USERNAME. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
if [ -n "${DOCKER_PASSWORD}" ]; then
echo "ERROR: DOCKER_PASSWORD is replaced by REGISTRY_TOKEN. Please update scripts."
echo "ERROR: DOCKER_PASSWORD is replaced by REGISTRY_TOKEN. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
if [ -n "${DOCKER_REGISTRY}" ]; then
echo "ERROR: DOCKER_REGISTRY is replaced by REGISTRY_URL. Please update scripts."
echo "ERROR: DOCKER_REGISTRY is replaced by REGISTRY_URL. Please update scripts." >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
"${FOREST_DIR}"/docker_build_and_push.sh "$1" "$2" "$5" "$3"