Skip to content

Commit

Permalink
switch back to original release job
Browse files Browse the repository at this point in the history
  • Loading branch information
shrunyan committed Mar 27, 2024
1 parent f01010c commit 751e173
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/cd-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ jobs:
SLACK_USERNAME: Deploy Bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

create_stage_release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: create local branch
run: git switch --create stage
- name: push local branch to origin
run: git push -u origin stage
- name: make pr
run: gh pr create -B stage -H dev --title 'Stage Release' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# create_stage_release:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Repo
# uses: actions/checkout@v4
# - name: create local branch
# run: git switch --create stage
# - name: push local branch to origin
# run: git push -u origin stage
# - name: make pr
# run: gh pr create -B stage -H dev --title 'Stage Release' --body 'Created by Github action'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# create_stage_release:
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -122,30 +122,30 @@ jobs:
# release-type: node
# target-branch: stage

# create_stage_pr:
# runs-on: ubuntu-latest
# needs: [deploy_dev]
# steps:
# - name: Checkout Repo
# uses: actions/checkout@v2
create_stage_pr:
runs-on: ubuntu-latest
# needs: [deploy_dev]
steps:
- name: Checkout Repo
uses: actions/checkout@v2

# - name: Check if PR exists
# id: check
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# prs=$(gh pr list \
# --repo "$GITHUB_REPOSITORY" \
# --head 'dev' \
# --base 'stage' \
# --json title \
# --jq 'length')
# if ((prs > 0)); then
# echo "skip=true" >> "$GITHUB_OUTPUT"
# fi
- name: Check if PR exists
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head 'dev' \
--base 'stage' \
--json title \
--jq 'length')
if ((prs > 0)); then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
# - name: Create Stage Release
# if: "!steps.check.outputs.skip"
# run: gh pr create -B stage -H dev --title 'Stage Release' --body 'Created by Github action'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Stage Release
if: "!steps.check.outputs.skip"
run: gh pr create -B stage -H dev --title 'Stage Release' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 751e173

Please sign in to comment.