Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Dockerfile #12

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions .github/workflows/pr-issue-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@ on:
- synchronize
- edited
- reopened
branches:
- 'main'
- 'release-**'
- 'master'
# paths-ignore:
# - 'docs/**'
# - '.github/'
# - 'CHANGELOG/'
# - 'charts/'
# - 'manifests/'
# - 'sample-docker-templates/'


jobs:
validate-PR-issue:
runs-on: ubuntu-latest
Expand All @@ -29,17 +18,17 @@ jobs:

- name: Validate Issue Reference
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
PR_BODY: ${{ github.event.pull_request.body }}
url: ${{ github.event.pull_request.url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRNUM: ${{ github.event.pull_request.number }}
TITLE: ${{ github.event.pull_request.title }}
run: |
set -x
set -e
if [[ "$TITLE" == *"doc:"* || "$TITLE" == *"docs:"* || "$TITLE" == *"chore:"* ]]; then
echo "Skipping validation as this is a PR for documentation or chore."
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"
gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
gh pr edit $PRNUM --remove-label "PR: Issue-verification-failed"
gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
exit 0
fi
pattern="((Fixes|Resolves) #[0-9]+)"
Expand Down Expand Up @@ -71,7 +60,7 @@ jobs:
if [[ $(echo "$text" | jq -r '.state') == "open" ]]; then
echo "Issue #$issue_num is open"
echo "Issue reference found in the pull request body."
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"
gh pr edit $PRNUM --remove-label "PR: Issue-verification-failed"
gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
exit 0
else
Expand All @@ -82,7 +71,7 @@ jobs:
echo "Invalid Response Code obtained - error code: $response_code"
echo "No valid issue reference found in the pull request body."
gh pr comment $PRNUM --body "PR is not linked to any issue, please make the corresponding changes in the body."
gh pr edit $PRNUM --add-label "PR:Issue-verification-failed"
gh pr edit $PRNUM --add-label "PR: Issue-verification-failed"
gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
exit 1
fi
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM python:3
RUN mkdir /app
RUN echo "bkcjsdvb" > token
RUN echo "bvj" > db.password
RUN echo "password = 1234567890" > password
RUN echo "qwerty = 12345" > qwerty.txt
WORKDIR /app
COPY . .
CMD ["python", "-u", "app.py"]
Loading