Skip to content

feat(pagination): Add pagination #1

feat(pagination): Add pagination

feat(pagination): Add pagination #1

name: Optional Review Deployment
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
jobs:
converage:
name: Converage
if: contains( github.event.pull_request.labels.*.name, 'review' )
environment:
name: review-${{ github.event.number }}
url: https://amazeit-sunflower-${{ github.event.number }}.sunflower3455.com
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Define environment url
run: |
pr_id=${{ github.event.number }}
github_repository_id=$(echo ${GITHUB_REPOSITORY} | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z)
echo WERF_SET_ENV_URL=envUrl=${github_repository_id}-${pr_id}.teleport.sunflower3455.com >> $GITHUB_ENV
if: contains( github.event.pull_request.labels.*.name, 'review' )
- name: Converge
uses: werf/actions/converge@v1.2
with:
env: review-${{ github.event.number }}
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
env:
WERF_SECRET_KEY: ${{ secrets.WERF_SECRET_KEY }}
if: contains( github.event.pull_request.labels.*.name, 'review' )
Dismiss:
name: Dismiss
runs-on: ubuntu-latest
if: "!contains( github.event.pull_request.labels.*.name, 'review' )"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Dismiss
uses: werf/actions/dismiss@v1.2
with:
env: review-${{ github.event.number }}
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
if: "!contains( github.event.pull_request.labels.*.name, 'review' )"
- uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: review-${{ github.event.number }}
if: "!contains( github.event.pull_request.labels.*.name, 'review' )"