Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Write a Ruby program to implement selection sort #1401

Write a Ruby program to implement selection sort

Write a Ruby program to implement selection sort #1401

name: Submit Program
on:
issues:
types: [labeled]
jobs:
submit_program:
# run only if repo is not a fork
if: github.repository == 'codinasion/codinasion' && github.event.action == 'labeled' && github.event.label.name == 'submit-program'
runs-on: ubuntu-latest
env:
NUMBER: ${{ github.event.issue.number }}
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
USER: ${{ github.event.issue.user.login }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Issue data
run: |
echo "Issue number : $NUMBER"
echo "Issue title : $TITLE"
echo "Issue body : $BODY"
echo "user : $USER"
# Accept Program
- name: Submit Program
id: submit-program
uses: ./action/
with:
SUBMIT_PROGRAM_USERNAME: ${{ env.USER }}
SUBMIT_PROGRAM_ISSUE_NUMBER: ${{ env.NUMBER }}
SUBMIT_PROGRAM_TITLE: ${{ env.TITLE }}
SUBMIT_PROGRAM_BODY: ${{ env.BODY }}
# Trigger
TRIGGER_SUBMIT_PROGRAM: true
# Secrets
GITHUB_TOKEN: ${{ secrets.CODINASION_REPO_TOKEN }}
# Create Pull Request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "Accept Program #${{ github.event.issue.number }}"
body: |
Issue Title: ${{ github.event.issue.title }}
Issue Number: #${{ github.event.issue.number }}
branch: "accept-program-${{ github.event.issue.number }}"
base: master
labels: "program"
add-paths: |
program/data/programs.json
committer: Harsh Raj <harshraj8843@users.noreply.github.com>
author: Harsh Raj <harshraj8843@users.noreply.github.com>
commit-message: Accept Program - ${{ github.event.issue.number }}
token: ${{ secrets.CODINASION_REPO_TOKEN }}
# Comment & Close
- name: Comment & Close
if: steps.submit-program.outputs.submit-success == 'true'
uses: ./action/
with:
SUBMIT_PROGRAM_ISSUE_NUMBER: ${{ github.event.issue.number }}
# Trigger
TRIGGER_SUBMIT_PROGRAM_COMMENT_CLOSE: true
# Secrets
GITHUB_TOKEN: ${{ secrets.CODINASION_REPO_TOKEN }}