Skip to content

Commit

Permalink
chore(ci): test
Browse files Browse the repository at this point in the history
  • Loading branch information
zsq1234 committed Aug 5, 2024
1 parent 5eeb1b3 commit 167a7a0
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions .github/actions/build-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,44 +38,44 @@ runs:
# docker rmi $(docker image ls -aq)
# df -h

- shell: bash
id: build-image
run: |
cd ${{ inputs.root-dir }}
# - shell: bash
# id: build-image
# run: |
# cd ${{ inputs.root-dir }}

if [[ "${{ inputs.namespace }}" == "" ]]; then
NAMESPACE=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]")
else
NAMESPACE="${{ inputs.namespace }}"
fi;
# if [[ "${{ inputs.namespace }}" == "" ]]; then
# NAMESPACE=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]")
# else
# NAMESPACE="${{ inputs.namespace }}"
# fi;

IMAGE_NAME_BASE="${{ inputs.registry }}/${NAMESPACE}/rocket.chat:${{ inputs.docker-tag }}"
# IMAGE_NAME_BASE="${{ inputs.registry }}/${NAMESPACE}/rocket.chat:${{ inputs.docker-tag }}"

IMAGE_NAME="${IMAGE_NAME_BASE}.${{ inputs.release }}"
# IMAGE_NAME="${IMAGE_NAME_BASE}.${{ inputs.release }}"

echo "Build Docker image ${IMAGE_NAME}"
# echo "Build Docker image ${IMAGE_NAME}"

DOCKER_PATH="${GITHUB_WORKSPACE}/apps/meteor/.docker"
if [[ '${{ inputs.release }}' = 'preview' ]]; then
DOCKER_PATH="${DOCKER_PATH}-mongo"
fi;
# DOCKER_PATH="${GITHUB_WORKSPACE}/apps/meteor/.docker"
# if [[ '${{ inputs.release }}' = 'preview' ]]; then
# DOCKER_PATH="${DOCKER_PATH}-mongo"
# fi;

DOCKERFILE_PATH="${DOCKER_PATH}/Dockerfile"
if [[ '${{ inputs.release }}' = 'alpine' ]]; then
DOCKERFILE_PATH="${DOCKERFILE_PATH}.${{ inputs.release }}"
fi;
# DOCKERFILE_PATH="${DOCKER_PATH}/Dockerfile"
# if [[ '${{ inputs.release }}' = 'alpine' ]]; then
# DOCKERFILE_PATH="${DOCKERFILE_PATH}.${{ inputs.release }}"
# fi;

echo "Copy Dockerfile for release: ${{ inputs.release }}"
cp $DOCKERFILE_PATH ./Dockerfile
if [ -e ${DOCKER_PATH}/entrypoint.sh ]; then
cp ${DOCKER_PATH}/entrypoint.sh .
fi;
# echo "Copy Dockerfile for release: ${{ inputs.release }}"
# cp $DOCKERFILE_PATH ./Dockerfile
# if [ -e ${DOCKER_PATH}/entrypoint.sh ]; then
# cp ${DOCKER_PATH}/entrypoint.sh .
# fi;

echo "Build ${{ inputs.release }} Docker image"
# docker build -t $IMAGE_NAME .
# echo "Build ${{ inputs.release }} Docker image"
# docker build -t $IMAGE_NAME .

echo "image-name-base=${IMAGE_NAME_BASE}" >> $GITHUB_OUTPUT
echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
# echo "image-name-base=${IMAGE_NAME_BASE}" >> $GITHUB_OUTPUT
# echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT

- name: Login to GitHub Container Registry
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && inputs.aliyun == 'no'
Expand Down

0 comments on commit 167a7a0

Please sign in to comment.