-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create CI job to run
melee-issues
(#983)
- Loading branch information
Showing
5 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM rust:latest AS check-issues | ||
COPY .github/packages/check-issues/setup.sh /usr/local/bin | ||
COPY . /input | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=C | ||
RUN chmod +x /usr/local/bin/setup.sh && setup.sh | ||
RUN rm -rf /input | ||
VOLUME [ "/input" ] | ||
COPY .github/packages/check-issues/entrypoint.sh /usr/local/bin | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
cd /input | ||
|
||
melee-issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
apt update | ||
|
||
apt install -y --no-install-recommends \ | ||
libclang-dev | ||
|
||
cargo install --path /input/tools/issues | ||
|
||
apt autoremove -y | ||
apt clean | ||
rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,9 @@ jobs: | |
|
||
- name: Set step summary | ||
if: matrix.make_flags == 'GENERATE_MAP=1' | ||
run: cat /tmp/output/PROGRESS.md >> $GITHUB_STEP_SUMMARY | ||
run: | | ||
printf "\`\`\`\n%s\n\`\`\`" "$(cat /tmp/output/PROGRESS.md)" \ | ||
>> $GITHUB_STEP_SUMMARY | ||
build-windows: | ||
name: Windows | ||
|
@@ -136,3 +138,51 @@ jobs: | |
--volume "${output}:C:/Output" ` | ||
--env MAKE_FLAGS="$env:MAKE_FLAGS" ` | ||
"$env:REGISTRY/$env:IMAGE" | ||
check-issues: | ||
name: Issues | ||
runs-on: ubuntu-latest | ||
env: | ||
REGISTRY: ghcr.io | ||
|
||
steps: | ||
- name: Get image name | ||
env: | ||
EVENT_NAME: ${{ github.event_name }} | ||
PUSH_REPO_NAME: ${{ github.repository }} | ||
PR_REPO_NAME: ${{ github.event.repository.full_name }} | ||
IMAGE_SUFFIX: check-issues:latest | ||
run: | | ||
result="" | ||
case "$EVENT_NAME" in | ||
push) | ||
result="$PUSH_REPO_NAME" | ||
;; | ||
pull_request) | ||
result="$PR_REPO_NAME" | ||
;; | ||
esac | ||
result=$(echo "$result/$IMAGE_SUFFIX" | tr '[:upper:]' '[:lower:]') | ||
echo "IMAGE=$result" >> $GITHUB_ENV | ||
- name: Checkout Melee repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log into container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Pull build image | ||
run: docker pull "$REGISTRY/$IMAGE" | ||
|
||
- name: Check for code issues | ||
run: | | ||
result=$(docker run --rm \ | ||
--volume "$PWD:/input:ro" \ | ||
"$REGISTRY/$IMAGE") | ||
echo "$result" | ||
printf "\`\`\`\n%s\n\`\`\`" "$result" >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters