forked from pennsignals/publish_docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (40 loc) · 1.12 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# action.yml
name: "Docker-Compose Publish"
author: "Darryl Mendillo"
description: "Publish all docker containers in docker-compose file"
branding:
icon: "database"
color: "red"
inputs:
version:
description: "Release version (tag)"
required: false
default: ''
docker_compose:
description: "docker-compose file to build and publish images from"
required: true
repo_token:
description: "Github Repo token"
required: false
default: ''
outputs:
tag:
description: "Tag that was published"
value: ${{ steps.tag.outputs.semver }}
runs:
using: "composite"
steps:
- id: tag
run: |
# if VERSION is not set, get it from git repo
VERSION="${{ inputs.version }}"
if [ -z "$VERSION" ]; then
VERSION=$(${{ github.action_path }}/src/version.sh)
fi
echo "VERSION: $VERSION"
echo "::set-output name=semver::$(echo $VERSION)"
echo "VERSION=$VERSION" >> $GITHUB_ENV
shell: bash
- id: publish
run: ${{ github.action_path }}/src/publish.sh $VERSION ${{ inputs.docker_compose }} ${{ inputs.repo_token }}
shell: bash