portainer-deploy: content-addressed Swarm configs from repo files (v5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a3c4ae5edf
commit
380988c194
2 files changed
+144
-69
No files matched your search
@@ -115,7 +115,7 @@ live) are kept and never logged; only `vars` are overwritten. Images are
|
||||
re-pulled (`pullImage`).
|
||||
|
||||
```yaml
|
||||
- uses: https://git.rfa.cz/tth-pub/ci-actions/portainer-deploy@v4
|
||||
- uses: https://git.rfa.cz/tth-pub/ci-actions/portainer-deploy@v5
|
||||
with:
|
||||
url: ${{ secrets.PORTAINER_URL }}
|
||||
token: ${{ secrets.PORTAINER_TOKEN }}
|
||||
@@ -128,6 +128,23 @@ re-pulled (`pullImage`).
|
||||
smoke-timeout: "180"
|
||||
```
|
||||
|
||||
Config files from the repo can ride along as Swarm configs. Each becomes a
|
||||
config named after its content hash, created when missing; the stack
|
||||
variable points at it, so a changed file rolls the services that mount it,
|
||||
and superseded versions are removed once nothing uses them:
|
||||
|
||||
```yaml
|
||||
configs: |
|
||||
CFG_NGINX=deploy/nginx.conf
|
||||
config-prefix: myapp_
|
||||
```
|
||||
|
||||
```yaml
|
||||
# compose
|
||||
configs:
|
||||
nginx_conf: {external: true, name: "${CFG_NGINX}"}
|
||||
```
|
||||
|
||||
Pin images in the compose file to the variable (`image: …:${IMAGE_TAG}`), so
|
||||
the deployed version is the commit that passed the gate, not whatever
|
||||
`latest` points at when Swarm pulls.
|
||||
|
||||
Reference in new issue
Block a user