diff --git a/.ghadocs.json b/.ghadocs.json new file mode 100644 index 0000000..8f0800f --- /dev/null +++ b/.ghadocs.json @@ -0,0 +1,17 @@ +{ + "paths": { + "action": "action.yml", + "readme": "README.md" + }, + "show_logo": true, + "versioning": { + "enabled": true, + "override": "", + "prefix": "v", + "branch": "main" + }, + "owner": "bitflight-devops", + "repo": "github-action-readme-generator", + "title_prefix": "GitHub Action: ", + "prettier": true +} diff --git a/.github/ghadocs/examples/1_environment-variables.md b/.github/ghadocs/examples/1_environment-variables.md new file mode 100644 index 0000000..9b7bee6 --- /dev/null +++ b/.github/ghadocs/examples/1_environment-variables.md @@ -0,0 +1,12 @@ + +### Example Using environment variables + +```yaml +steps: + - uses: actions/checkout@v4 + - uses: hoverkraft-tech/compose-action@v1.5.1 + with: + compose-file: "./docker/docker-compose.yml" + env: + CUSTOM_VARIABLE: "test" +``` diff --git a/.github/ghadocs/examples/2_services.md b/.github/ghadocs/examples/2_services.md new file mode 100644 index 0000000..21325f6 --- /dev/null +++ b/.github/ghadocs/examples/2_services.md @@ -0,0 +1,16 @@ + +### Example using `services` + +Perform `docker-compose up` to some given service instead of all of them + +```yaml +steps: + # need checkout before using compose-action + - uses: actions/checkout@v3 + - uses: hoverkraft-tech/compose-action@v1.5.1 + with: + compose-file: "./docker/docker-compose.yml" + services: | + helloworld2 + helloworld3 +``` diff --git a/.github/ghadocs/examples/3_up-flags.md b/.github/ghadocs/examples/3_up-flags.md new file mode 100644 index 0000000..c8c0395 --- /dev/null +++ b/.github/ghadocs/examples/3_up-flags.md @@ -0,0 +1,4 @@ + +### Example using `up-flags` + +Specify flags to pass to the `docker-compose up`. Default is none. Can be used to pass the `--build` flag, for example, if you want persistent volumes to be deleted as well during cleanup. A full list of flags can be found in the [docker-compose up documentation](https://docs.docker.com/compose/reference/up/). diff --git a/.github/ghadocs/examples/4_down-flags.md b/.github/ghadocs/examples/4_down-flags.md new file mode 100644 index 0000000..a7880ee --- /dev/null +++ b/.github/ghadocs/examples/4_down-flags.md @@ -0,0 +1,4 @@ + +### Example using `down-flags` + +Specify flags to pass to the `docker-compose down` command during cleanup. Default is none. Can be used to pass the `--volumes` flag, for example, if you want persistent volumes to be deleted as well during cleanup. A full list of flags can be found in the [docker-compose down documentation](https://docs.docker.com/compose/reference/down/). diff --git a/.github/ghadocs/examples/5_compose-flags.md b/.github/ghadocs/examples/5_compose-flags.md new file mode 100644 index 0000000..de7cb8b --- /dev/null +++ b/.github/ghadocs/examples/5_compose-flags.md @@ -0,0 +1,16 @@ + +### Example using `compose-flags` + +Specify flags to pass to the `docker-compose` command. Default is none. A full list of flags can be found in the [docker-compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help). + +```yaml +steps: + # need checkout before using compose-action + - uses: actions/checkout@v3 + - uses: hoverkraft-tech/compose-action@v1.5.1 + with: + compose-file: "./docker/docker-compose.yml" + services: | + helloworld2 + helloworld3 +``` diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 2303cfb..fd4ce51 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -11,4 +11,26 @@ concurrency: jobs: ci: uses: ./.github/workflows/__shared-ci.yml - secrets: inherit \ No newline at end of file + secrets: inherit + + generate-readme: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bitflight-devops/github-action-readme-generator@v1.8.0 + - uses: actions/create-github-app-token@v1 + id: generate-token + with: + app-id: ${{ vars.CI_BOT_APP_ID }} + private-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }} + + - uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@main + with: + github-token: ${{ steps.generate-token.outputs.token }} + branch: docs/actions-workflows-documentation-update + title: "docs: update actions and workflows documentation" + body: Update actions and workflows documentation + commit-message: | + docs: update actions and workflows documentation + + [skip ci] diff --git a/README.md b/README.md index 01b64ad..8187747 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,23 @@ -# Docker Compose Action + +