Revert "fix"

This reverts commit 69af557f95.
This commit is contained in:
Warunee Tamkoo 2025-09-16 18:16:35 +07:00
parent 69af557f95
commit 9a4e49eb88

View file

@ -27,22 +27,23 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 - name: Extract version from tag
with: id: version
config-inline: |
[registry."${{ env.REGISTRY }}"]
ca=["/etc/ssl/certs/ca-certificates.crt"]
- name: Tag Version
run: | run: |
if [[ "${{ gitea.ref }}" == "refs/tags/"* ]]; then if [ "${{ gitea.event_name }}" == "push" ] && [ -n "${{ gitea.ref_name }}" ]; then
VERSION=$(echo "${{ gitea.ref }}" | sed 's#refs/tags/placement-dev##') # Extract version from tag (remove 'placement-dev' prefix)
VERSION="${{ gitea.ref_name }}"
VERSION="${VERSION#placement-dev}"
echo "IMAGE_VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
else else
VERSION="${{ inputs.version }}" # Use workflow dispatch input or default to 'latest'
VERSION="${{ inputs.version || 'latest' }}"
echo "IMAGE_VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
fi fi
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT echo "Using version: $VERSION"
echo "Using version: ${VERSION}"
shell: bash
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -64,7 +65,7 @@ jobs:
push: true push: true
- name: Remote Deploy - name: Remote Deploy
uses: appleboy/ssh-action@v1.2.1 uses: appleboy/ssh-action@v1.0.3
with: with:
host: ${{ vars.SSH_DEPLOY_HOST }} host: ${{ vars.SSH_DEPLOY_HOST }}
port: ${{ vars.SSH_DEPLOY_PORT }} port: ${{ vars.SSH_DEPLOY_PORT }}