Added docs container
This commit is contained in:
46
.github/workflows/build.yaml
vendored
46
.github/workflows/build.yaml
vendored
@ -48,3 +48,49 @@ jobs:
|
||||
uses: ztimson/actions/tag@develop
|
||||
with:
|
||||
tag: ${{env.VERSION}}
|
||||
|
||||
|
||||
docs:
|
||||
name: Publish Documentation
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
container: docker
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
uses: ztimson/actions/clone@develop
|
||||
|
||||
- name: Get Version Number
|
||||
shell: sh
|
||||
run: |
|
||||
[[ -f server/package.json ]] && echo "VERSION=$(cat server/package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+')" >> $GITHUB_ENV
|
||||
|
||||
- name: Push with branch tag
|
||||
uses: ztimson/actions/docker/push@develop
|
||||
with:
|
||||
registry: ${{github.server_url}}
|
||||
user: ${{github.repository_owner}}
|
||||
pass: ${{secrets.DEPLOY_TOKEN}}
|
||||
name: ${{github.repository}}
|
||||
tag: ${{github.ref_name}}
|
||||
|
||||
- name: Push with version tag
|
||||
uses: ztimson/actions/docker/push@develop
|
||||
if: ${{env.VERSION}}
|
||||
with:
|
||||
from: "${{github.server_url}}/${{github.repository}}:${{github.ref_name}}"
|
||||
registry: ${{github.server_url}}
|
||||
user: ${{github.repository_owner}}
|
||||
pass: ${{secrets.DEPLOY_TOKEN}}
|
||||
name: ${{github.repository}}
|
||||
tag: ${{env.VERSION}}
|
||||
|
||||
- name: Push with latest tag
|
||||
uses: ztimson/actions/docker/push@develop
|
||||
if: ${{github.ref_name}} == (git symbolic-ref refs/remotes/origin/HEAD --short | cut -c 7)
|
||||
with:
|
||||
from: "${{github.server_url}}/${{github.repository}}:${{github.ref_name}}"
|
||||
registry: ${{github.server_url}}
|
||||
user: ${{github.repository_owner}}
|
||||
pass: ${{secrets.DEPLOY_TOKEN}}
|
||||
name: ${{github.repository}}
|
||||
tag: latest
|
||||
|
Reference in New Issue
Block a user