mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-01-12 23:53:07 +08:00
Compare commits
4 Commits
40041ff1b9
...
0ec2d95d2f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ec2d95d2f | ||
|
|
a5e6b53f31 | ||
|
|
3b8348c096 | ||
|
|
1c0bf1362e |
2
.github/ghadocs/examples/3_up-flags.md
vendored
2
.github/ghadocs/examples/3_up-flags.md
vendored
@ -5,4 +5,4 @@
|
||||
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/).
|
||||
[Docker compose up documentation](https://docs.docker.com/compose/reference/up/).
|
||||
|
||||
2
.github/ghadocs/examples/5_compose-flags.md
vendored
2
.github/ghadocs/examples/5_compose-flags.md
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
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).
|
||||
[Docker compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
|
||||
24
.github/workflows/__check-action.yml
vendored
24
.github/workflows/__check-action.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with services
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -33,7 +33,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test compose action
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -45,7 +45,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with compose flags
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -62,7 +62,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with env
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -83,7 +83,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with multiple compose files
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -108,7 +108,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with cwd
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -131,7 +131,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with absolute path
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -153,7 +153,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with --abort-on-container-exit
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -165,7 +165,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with --attach-dependencies and service failure
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Act
|
||||
uses: ./
|
||||
@ -184,7 +184,7 @@ jobs:
|
||||
env:
|
||||
DOCKER_COMPOSE_VERSION: "2.29.0"
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: "Arrange: ensure original docker compose version is not the expected one"
|
||||
run: |
|
||||
@ -216,7 +216,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with compose version latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: "Arrange: retrieve latest version of docker compose"
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
@ -259,7 +259,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test with docker context
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Set up Docker
|
||||
uses: docker/setup-docker-action@b60f85385d03ac8acfca6d9996982511d8620a19 # v4.3.0
|
||||
|
||||
4
.github/workflows/__check-dist.yml
vendored
4
.github/workflows/__check-dist.yml
vendored
@ -11,8 +11,8 @@ jobs:
|
||||
name: Check dist
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@77c905a25700b1ca630037812b5df42d2d7c40ae # 0.12.0
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@284b3a225640afe54977ca18caf464dff1ee856b # 0.14.0
|
||||
|
||||
- name: Build dist/ Directory
|
||||
id: package
|
||||
|
||||
2
.github/workflows/__check-nodejs.yml
vendored
2
.github/workflows/__check-nodejs.yml
vendored
@ -10,7 +10,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
test-nodejs:
|
||||
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@77c905a25700b1ca630037812b5df42d2d7c40ae # 0.12.0
|
||||
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@284b3a225640afe54977ca18caf464dff1ee856b # 0.14.0
|
||||
permissions:
|
||||
id-token: write
|
||||
security-events: write
|
||||
|
||||
2
.github/workflows/__shared-ci.yml
vendored
2
.github/workflows/__shared-ci.yml
vendored
@ -13,7 +13,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
|
||||
with:
|
||||
linter-env: |
|
||||
FILTER_REGEX_EXCLUDE=dist/**/*
|
||||
|
||||
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
@ -13,4 +13,4 @@ permissions:
|
||||
|
||||
jobs:
|
||||
greetings:
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
|
||||
|
||||
6
.github/workflows/main-ci.yml
vendored
6
.github/workflows/main-ci.yml
vendored
@ -33,19 +33,19 @@ jobs:
|
||||
if: github.event_name != 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: bitflight-devops/github-action-readme-generator@f750ff0ac8a4b68a3c2d622cc50a5ad20bcebaa1 # v1.8.0
|
||||
with:
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
|
||||
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
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@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
|
||||
- uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
|
||||
with:
|
||||
github-token: ${{ steps.generate-token.outputs.token }}
|
||||
branch: docs/actions-workflows-documentation-update
|
||||
|
||||
2
.github/workflows/need-fix-to-issue.yml
vendored
2
.github/workflows/need-fix-to-issue.yml
vendored
@ -21,7 +21,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
main:
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
|
||||
with:
|
||||
manual-commit-ref: ${{ inputs.manual-commit-ref }}
|
||||
manual-base-ref: ${{ inputs.manual-base-ref }}
|
||||
|
||||
2
.github/workflows/semantic-pull-request.yml
vendored
2
.github/workflows/semantic-pull-request.yml
vendored
@ -13,4 +13,4 @@ permissions:
|
||||
|
||||
jobs:
|
||||
main:
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
|
||||
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@ -10,4 +10,4 @@ permissions:
|
||||
|
||||
jobs:
|
||||
main:
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
|
||||
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#checkov:skip=CKV_DOCKER_2: required
|
||||
FROM ghcr.io/super-linter/super-linter:slim-v7
|
||||
FROM ghcr.io/super-linter/super-linter:slim-v8
|
||||
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
5
Makefile
5
Makefile
@ -9,12 +9,14 @@ lint: ## Execute linting
|
||||
lint-fix: ## Execute linting and fix
|
||||
$(call run_linter, \
|
||||
-e FIX_JSON_PRETTIER=true \
|
||||
-e FIX_JAVASCRIPT_PRETTIER=true \
|
||||
-e FIX_YAML_PRETTIER=true \
|
||||
-e FIX_MARKDOWN=true \
|
||||
-e FIX_MARKDOWN_PRETTIER=true \
|
||||
-e FIX_NATURAL_LANGUAGE=true)
|
||||
|
||||
all: ## Execute all formats and checks
|
||||
@npm audit fix
|
||||
@npm run all
|
||||
$(MAKE) lint-fix
|
||||
|
||||
@ -27,13 +29,10 @@ define run_linter
|
||||
-e DEFAULT_WORKSPACE="$$DEFAULT_WORKSPACE" \
|
||||
-e FILTER_REGEX_INCLUDE="$(filter-out $@,$(MAKECMDGOALS))" \
|
||||
-e IGNORE_GITIGNORED_FILES=true \
|
||||
-e KUBERNETES_KUBECONFORM_OPTIONS="--schema-location default --schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'" \
|
||||
-e FILTER_REGEX_EXCLUDE=dist/**/* \
|
||||
-e VALIDATE_TYPESCRIPT_STANDARD=false \
|
||||
-e VALIDATE_TYPESCRIPT_ES=false \
|
||||
-e VALIDATE_TYPESCRIPT_PRETTIER=false \
|
||||
-e VALIDATE_JAVASCRIPT_ES=false \
|
||||
-e VALIDATE_JAVASCRIPT_STANDARD=false \
|
||||
$(1) \
|
||||
-v $$VOLUME \
|
||||
--rm \
|
||||
|
||||
18
README.md
18
README.md
@ -111,16 +111,16 @@ Some extra options can be passed to the `docker compose down` command using the
|
||||
|
||||
| **Input** | **Description** | **Default** | **Required** |
|
||||
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ | ------------ |
|
||||
| <code>docker-flags</code> | Additional options to pass to <code>docker</code> command. | | **false** |
|
||||
| <code>docker-flags</code> | Additional options to pass to <code>Docker</code> command. | | **false** |
|
||||
| <code>compose-file</code> | Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd). | <code>./docker-compose.yml</code> | **false** |
|
||||
| <code>services</code> | Services to perform docker compose up. | | **false** |
|
||||
| <code>up-flags</code> | Additional options to pass to <code>docker compose up</code> command. | | **false** |
|
||||
| <code>down-flags</code> | Additional options to pass to <code>docker compose down</code> command. | | **false** |
|
||||
| <code>compose-flags</code> | Additional options to pass to <code>docker compose</code> command. | | **false** |
|
||||
| <code>services</code> | Services to perform Docker compose up. | | **false** |
|
||||
| <code>up-flags</code> | Additional options to pass to <code>Docker compose up</code> command. | | **false** |
|
||||
| <code>down-flags</code> | Additional options to pass to <code>Docker compose down</code> command. | | **false** |
|
||||
| <code>compose-flags</code> | Additional options to pass to <code>Docker compose</code> command. | | **false** |
|
||||
| <code>cwd</code> | Current working directory | <code>${{ github.workspace }}</code> | **false** |
|
||||
| <code>compose-version</code> | Compose version to use.<br />If null (default), it will use the current installed version.<br />If "latest", it will install the latest version. | | **false** |
|
||||
| <code>services-log-level</code> | The log level used for Docker Compose service logs.<br />Can be one of "debug", "info". | <code>debug</code> | **false** |
|
||||
| <code>github-token</code> | The GitHub token used to create an authenticated client (to fetch the latest version of docker compose). | <code>${{ github.token }}</code> | **false** |
|
||||
| <code>github-token</code> | The GitHub token used to create an authenticated client (to fetch the latest version of Docker compose). | <code>${{ github.token }}</code> | **false** |
|
||||
|
||||
<!-- end inputs -->
|
||||
<!-- start outputs -->
|
||||
@ -188,7 +188,7 @@ steps:
|
||||
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/).
|
||||
[Docker compose up documentation](https://docs.docker.com/compose/reference/up/).
|
||||
|
||||
### Example using `down-flags`
|
||||
|
||||
@ -196,13 +196,13 @@ 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/).
|
||||
[Docker compose down documentation](https://docs.docker.com/compose/reference/down/).
|
||||
|
||||
### 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).
|
||||
[Docker compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
|
||||
6052
package-lock.json
generated
6052
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@
|
||||
"docker-compose": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ts-dev-tools/core": "^1.6.2",
|
||||
"@ts-dev-tools/core": "^1.9.5",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"eslint-plugin-github": "^6.0.0",
|
||||
"eslint-plugin-jsonc": "^2.20.1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user