Skip to content

feat: DIA-1402: V1-Submit Prompt auto-refinement job #676

feat: DIA-1402: V1-Submit Prompt auto-refinement job

feat: DIA-1402: V1-Submit Prompt auto-refinement job #676

Workflow file for this run

name: "CI/CD Pipeline"
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- master
concurrency:
group: CI/CD Pipeline-${{ github.event.pull_request.number || github.event.pull_request.head.ref || github.ref_name }}
cancel-in-progress: true
jobs:
details:
name: "Details"
runs-on: ubuntu-latest
outputs:
membership: ${{ steps.membership.outputs.membership }}
steps:
- name: Check user's membership
uses: actions/github-script@v7
id: membership
env:
ACTOR: ${{ github.actor }}
with:
github-token: ${{ secrets.GIT_PAT }}
script: |
const { owner } = context.repo;
const actor = process.env.ACTOR;
github.rest.orgs.getMembershipForUser({
org: owner,
username: actor,
})
.then(response => core.setOutput("membership", response.data))
.catch(reason => core.setOutput("membership", false));
build:
name: "Build"
uses: ./.github/workflows/docker-build.yml
permissions:
contents: read
checks: write
with:
sha: ${{ github.event.pull_request.head.sha || github.event.after }}
branch_name: ${{ github.event.pull_request.head.ref || github.ref_name }}
secrets: inherit
deploy:
name: "Deploy"
if: github.event_name == 'pull_request' && needs.details.outputs.membership || github.event_name == 'push' && needs.details.outputs.membership
uses: ./.github/workflows/argocd-deploy.yml
needs:
- details
- build
permissions:
contents: read
deployments: write
with:
docker_image_version: ${{ needs.build.outputs.image_version }}
app_name: ${{ needs.build.outputs.pretty_branch_name }}
secrets: inherit