generated from emmeowzing/base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from emmeowzing/configure-project
configure-project: initial commit
- Loading branch information
Showing
15 changed files
with
116 additions
and
164 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
_extends: .github | ||
|
||
repository: | ||
name: base | ||
description: Base repository with default settings and configs | ||
homepage: github.com | ||
name: directory-anarchy | ||
description: A directory traversal game that teaches you Bash | ||
homepage: anarchy.aperiodicity.com | ||
|
||
# A comma-separated list of topics to set on the repository | ||
topics: settings | ||
private: false | ||
private: false |
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 |
---|---|---|
@@ -1,23 +1,38 @@ | ||
fail_fast: true | ||
repos: | ||
# Requires hadolint binary on local machine. | ||
- repo: https://github.com/hadolint/hadolint | ||
rev: v2.12.0 | ||
hooks: | ||
- id: hadolint | ||
args: | ||
- --config | ||
- config/.hadolint.yaml | ||
- Dockerfile | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
args: [--maxkb=10000, --enforce-all] | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: mixed-line-ending | ||
|
||
- repo: https://github.com/bjd2385/circleci-orb-pre-commit-hook | ||
rev: v1.2.0 | ||
- repo: https://github.com/jumanjihouse/pre-commit-hooks | ||
rev: 3.0.0 | ||
hooks: | ||
- id: circleci-orb-validate | ||
- id: shellcheck | ||
args: | ||
- src # Target the src/ directory. | ||
- "true" # Enable pre-pack prior to validation. | ||
- -x | ||
|
||
- repo: https://github.com/bjd2385/circleci-config-pre-commit-hook | ||
rev: v1.0.3 | ||
- repo: https://github.com/emmeowzing/dynamic-continuation-orb | ||
rev: v3.6.8 | ||
hooks: | ||
- id: circleci-config-validate | ||
|
||
- repo: https://github.com/premiscale/pre-commit-hooks | ||
rev: v0.0.7 | ||
hooks: | ||
- id: msg-issue-prefix |
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,2 @@ | ||
shellcheck 0.10.0 | ||
hadolint 2.12.0 |
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,29 @@ | ||
# Contributing | ||
|
||
To contribute to this repository, start by installing the necessary dependencies and following the build steps, below! | ||
|
||
## Dependencies | ||
|
||
Install asdf, followed by executing the dependencies script. | ||
|
||
```shell | ||
./scripts/dependencies.sh | ||
``` | ||
|
||
This script will install all necessary tools and their versions as defined in the `.tool-versions`-file at the root of this repository. | ||
|
||
### Docker | ||
|
||
This project has primarily been developed on Docker. Please have a suitable version installed on your machine (25 and later). Please open an Issue in this repository if you have any issues running this container image. | ||
|
||
## Build | ||
|
||
Run the following Docker build and run commands to execute this codebase. | ||
|
||
```shell | ||
DOCKER_BUILDKIT=1 docker build --platform="linux/[amd64|arm64]" . -t directory-anarchy:latest | ||
docker run -it -e DEBUG=true -n directory-anarchy-game directory-anarchy:latest | ||
``` | ||
|
||
### pre-commit | ||
|
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,31 @@ | ||
ARG REGISTRY=docker.io | ||
ARG IMAGE=ubuntu | ||
ARG TAG=22.04 | ||
|
||
FROM ${REGISTRY}/${IMAGE}:${TAG} | ||
|
||
SHELL [ "/bin/bash", "-c" ] | ||
|
||
ENV DEBUG=false | ||
|
||
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys | ||
LABEL org.opencontainers.image.description "Directory anarchy game" | ||
LABEL org.opencontainers.image.licenses "MIT" | ||
LABEL org.opencontainers.image.authors "Emma Doyle <[email protected]>, Willow Ahrens <[email protected]>" | ||
LABEL org.opencontainers.image.documentation "https://anarchy.aperiodicity.com" | ||
|
||
USER root | ||
|
||
# apt list -a bash && apt install -y \ | ||
RUN apt update \ | ||
&& rm -rf /var/apt/lists/* \ | ||
&& groupadd anarchists --gid 1001 \ | ||
&& useradd -rm -d /opt/anarchy -s /bin/bash -g anarchists -u 1001 anarchist | ||
|
||
WORKDIR /opt/anarchy | ||
|
||
COPY --chown=anarchist:anarchists scripts/cmd.sh . | ||
|
||
USER anarchist | ||
|
||
CMD [ "./cmd.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,10 @@ | ||
ignored: | ||
- DL3008 | ||
- DL3015 | ||
- DL4006 | ||
- DL3027 | ||
- DL3013 | ||
- DL3042 | ||
- SC1091 | ||
- DL3033 | ||
- DL3032 |
Empty file.
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,2 @@ | ||
#! /usr/bin/env bash | ||
# Start the game. |
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,7 @@ | ||
#! /usr/bin/env bash | ||
# Install all dependencies for developing this project. | ||
|
||
asdf plugin add hadolint https://github.com/looztra/asdf-hadolint.git | ||
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git | ||
|
||
asdf install |