mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-01-14 00:23:08 +08:00
Compare commits
7 Commits
3a9fe54818
...
1551970749
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1551970749 | ||
|
|
59a51a1b9c | ||
|
|
2daef55cd7 | ||
|
|
4e1d048b27 | ||
|
|
d885714cc1 | ||
|
|
329c851e91 | ||
|
|
213193f269 |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -41,7 +41,7 @@ updates:
|
|||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: "/"
|
directory: "/"
|
||||||
open-pull-requests-limit: 20
|
open-pull-requests-limit: 20
|
||||||
versioning-strategy: widen
|
versioning-strategy: increase
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: friday
|
day: friday
|
||||||
|
|||||||
159
.github/ghadocs/branding.svg
vendored
159
.github/ghadocs/branding.svg
vendored
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.5 MiB |
18
.github/ghadocs/examples/6_multiple-compose-files.md
vendored
Normal file
18
.github/ghadocs/examples/6_multiple-compose-files.md
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!-- markdownlint-disable first-line-heading -->
|
||||||
|
|
||||||
|
### Example with multiple compose files
|
||||||
|
|
||||||
|
Specify multiple compose files to use with the `docker compose` command. This is
|
||||||
|
useful when you have a base compose file and additional files for different
|
||||||
|
environments or configurations.
|
||||||
|
|
||||||
|
```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
|
||||||
|
./docker/docker-compose.ci.yml
|
||||||
|
```
|
||||||
24479
.github/ghadocs/social-preview.svg
vendored
Normal file
24479
.github/ghadocs/social-preview.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 3.5 MiB |
@ -1 +1 @@
|
|||||||
20.9.0
|
20.19.3
|
||||||
|
|||||||
@ -9,4 +9,4 @@ USER ${UID}:${GID}
|
|||||||
ENV RUN_LOCAL=true
|
ENV RUN_LOCAL=true
|
||||||
ENV USE_FIND_ALGORITHM=true
|
ENV USE_FIND_ALGORITHM=true
|
||||||
ENV LOG_LEVEL=WARN
|
ENV LOG_LEVEL=WARN
|
||||||
ENV LOG_FILE="../logs"
|
ENV LOG_FILE="/github/home/logs"
|
||||||
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright Hoverkraft
|
Copyright hoverkraft
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
33
README.md
33
README.md
@ -2,12 +2,12 @@
|
|||||||
<div align="center" width="100%">
|
<div align="center" width="100%">
|
||||||
<!-- start branding -->
|
<!-- start branding -->
|
||||||
|
|
||||||
<img src=".github/ghadocs/branding.svg" width="15%" align="center" alt="branding<icon:anchor color:gray-dark>" />
|
<img src=".github/ghadocs/branding.svg" width="15%" align="center" alt="branding<icon:anchor color:blue>" />
|
||||||
|
|
||||||
<!-- end branding -->
|
<!-- end branding -->
|
||||||
<!-- start title -->
|
<!-- start title -->
|
||||||
|
|
||||||
# <img src=".github/ghadocs/branding.svg" width="60px" align="center" alt="branding<icon:anchor color:gray-dark>" /> GitHub Action: Docker Compose Action
|
# <img src=".github/ghadocs/branding.svg" width="60px" align="center" alt="branding<icon:anchor color:blue>" /> GitHub Action: Docker Compose Action
|
||||||
|
|
||||||
<!-- end title -->
|
<!-- end title -->
|
||||||
<!-- markdownlint-disable MD013 -->
|
<!-- markdownlint-disable MD013 -->
|
||||||
@ -90,15 +90,17 @@ Some extra options can be passed to the `docker compose down` command using the
|
|||||||
#
|
#
|
||||||
compose-version: ""
|
compose-version: ""
|
||||||
|
|
||||||
|
# Description: The log level used for Docker Compose service logs. Can be one of
|
||||||
|
# "debug", "info".
|
||||||
|
#
|
||||||
|
# Default: debug
|
||||||
|
services-log-level: ""
|
||||||
|
|
||||||
# Description: The GitHub token used to create an authenticated client (to fetch
|
# Description: The GitHub token used to create an authenticated client (to fetch
|
||||||
# the latest version of docker compose).
|
# the latest version of docker compose).
|
||||||
#
|
#
|
||||||
# Default: ${{ github.token }}
|
# Default: ${{ github.token }}
|
||||||
github-token: ""
|
github-token: ""
|
||||||
|
|
||||||
# Description: The log level used for Docker Compose service logs. Can be one of "debug", "info".
|
|
||||||
# Default: "debug"
|
|
||||||
services-log-level: "debug"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- end usage -->
|
<!-- end usage -->
|
||||||
@ -117,8 +119,8 @@ Some extra options can be passed to the `docker compose down` command using the
|
|||||||
| <code>compose-flags</code> | Additional options to pass to <code>docker compose</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>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>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** |
|
||||||
| <code>services-log-level</code> | The log level used for Docker Compose service logs. Can be one of "debug", "info". | debug | **false** |
|
|
||||||
|
|
||||||
<!-- end inputs -->
|
<!-- end inputs -->
|
||||||
<!-- start outputs -->
|
<!-- start outputs -->
|
||||||
@ -213,3 +215,20 @@ steps:
|
|||||||
helloworld2
|
helloworld2
|
||||||
helloworld3
|
helloworld3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Example with multiple compose files
|
||||||
|
|
||||||
|
Specify multiple compose files to use with the `docker compose` command. This is
|
||||||
|
useful when you have a base compose file and additional files for different
|
||||||
|
environments or configurations.
|
||||||
|
|
||||||
|
```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
|
||||||
|
./docker/docker-compose.ci.yml
|
||||||
|
```
|
||||||
|
|||||||
10
action.yml
10
action.yml
@ -1,9 +1,9 @@
|
|||||||
name: "Docker Compose Action"
|
name: "Docker Compose Action"
|
||||||
description: "This action runs your compose file(s) and clean up before action finished"
|
description: "This action runs your compose file(s) and clean up before action finished"
|
||||||
author: "Hoverkraft"
|
author: "hoverkraft"
|
||||||
branding:
|
branding:
|
||||||
icon: anchor
|
icon: anchor
|
||||||
color: gray-dark
|
color: blue
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
docker-flags:
|
docker-flags:
|
||||||
@ -38,6 +38,12 @@ inputs:
|
|||||||
If null (default), it will use the current installed version.
|
If null (default), it will use the current installed version.
|
||||||
If "latest", it will install the latest version.
|
If "latest", it will install the latest version.
|
||||||
required: false
|
required: false
|
||||||
|
services-log-level:
|
||||||
|
description: |
|
||||||
|
The log level used for Docker Compose service logs.
|
||||||
|
Can be one of "debug", "info".
|
||||||
|
required: false
|
||||||
|
default: "debug"
|
||||||
github-token:
|
github-token:
|
||||||
description: The GitHub token used to create an authenticated client (to fetch the latest version of docker compose).
|
description: The GitHub token used to create an authenticated client (to fetch the latest version of docker compose).
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
|
|||||||
2846
package-lock.json
generated
2846
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@ -2,9 +2,10 @@
|
|||||||
"name": "compose-action",
|
"name": "compose-action",
|
||||||
"description": "Docker Compose Action",
|
"description": "Docker Compose Action",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"author": "",
|
"author": "hoverkraft",
|
||||||
"private": true,
|
"license": "MIT",
|
||||||
"homepage": "https://github.com/hoverkraft-tech/compose-action",
|
"homepage": "https://github.com/hoverkraft-tech/compose-action",
|
||||||
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/hoverkraft-tech/compose-action.git"
|
"url": "git+https://github.com/hoverkraft-tech/compose-action.git"
|
||||||
@ -22,6 +23,19 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/core": "^1.11.1",
|
||||||
|
"@actions/github": "^6.0.1",
|
||||||
|
"@actions/tool-cache": "^2.0.2",
|
||||||
|
"@octokit/action": "^8.0.2",
|
||||||
|
"docker-compose": "^1.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@ts-dev-tools/core": "^1.9.3",
|
||||||
|
"@vercel/ncc": "^0.38.3",
|
||||||
|
"eslint-plugin-github": "^6.0.0",
|
||||||
|
"eslint-plugin-jsonc": "^2.20.1"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"package": "npm run package:index && npm run package:post",
|
"package": "npm run package:index && npm run package:post",
|
||||||
"package:index": "ncc build src/index.ts -o dist --license licenses.txt",
|
"package:index": "ncc build src/index.ts -o dist --license licenses.txt",
|
||||||
@ -38,7 +52,6 @@
|
|||||||
"test:ci": "npm run test:cov --runInBand",
|
"test:ci": "npm run test:cov --runInBand",
|
||||||
"prepare": "ts-dev-tools install"
|
"prepare": "ts-dev-tools install"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "ts-jest",
|
"preset": "ts-jest",
|
||||||
"verbose": true,
|
"verbose": true,
|
||||||
@ -71,19 +84,6 @@
|
|||||||
"**/src/**/*.[jt]s?(x)"
|
"**/src/**/*.[jt]s?(x)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@actions/core": "^1.11.1",
|
|
||||||
"@actions/github": "^6.0.1",
|
|
||||||
"@actions/tool-cache": "^2.0.2",
|
|
||||||
"@octokit/action": "^8.0.2",
|
|
||||||
"docker-compose": "^1.2.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@ts-dev-tools/core": "^1.6.2",
|
|
||||||
"@vercel/ncc": "^0.38.3",
|
|
||||||
"eslint-plugin-github": "^6.0.0",
|
|
||||||
"eslint-plugin-jsonc": "^2.20.1"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user