42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: ChatOps Deploy
|
|
on: issue_comment
|
|
|
|
jobs:
|
|
testing:
|
|
if: |
|
|
gitea.event.issue.pull_request &&
|
|
startsWith(gitea.event.comment.body, '/deploy')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Debug context
|
|
run: |
|
|
echo "Event: ${{ github.event_name }}"
|
|
echo "Ref: ${{ github.ref }}"
|
|
echo "Ref name: ${{ github.ref_name }}"
|
|
echo "Head ref: ${{ github.head_ref }}"
|
|
echo "Is PR comment: ${{ !!github.event.issue.pull_request }}"
|
|
echo "PR number: ${{ github.event.issue.number }}"
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get branch name
|
|
id: branch_name
|
|
uses: ./.gitea/actions/getTagSafeRef
|
|
|
|
# - name: Print result
|
|
# run: echo "Branch name: ${{ steps.branch_name.outputs.branch_name }}"
|
|
|
|
# - name: Build and push image
|
|
# id: docker_build
|
|
# uses: ./.github/actions/buildDockerImage
|
|
# with:
|
|
# tag: ${{ steps.branch_name.outputs.branch_name }}
|
|
|
|
# - name: Deploy application
|
|
# uses: ./.github/actions/deploy
|
|
# with:
|
|
# project_name: ${{ steps.branch_name.outputs.branch_name }}
|
|
# url: '${{ steps.branch_name.outputs.branch_name }}.phoenix.klemp.local'
|
|
# image_url: ${{ steps.docker_build.outputs.image_url }}
|