-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.08 KB
/
publish.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
41
42
43
44
45
46
47
48
49
50
name: 'Publish'
on:
push:
branches:
- main
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
required: false
permissions:
checks: write
contents: write
jobs:
lint:
name: Lint
uses: ./.github/workflows/lint.yml
build:
name: Build
uses: ./.github/workflows/build.yml
version:
name: Version
uses: ./.github/workflows/version.yml
with:
version: ${{ inputs.version }}
publish_github:
name: Publish to GitHub
uses: ./.github/workflows/publish-github.yml
needs: [version]
if: ${{ (needs.version.outputs.next_version != needs.version.outputs.previous_version) && (github.ref == 'refs/heads/main') }}
secrets: inherit
with:
version: ${{ needs.version.outputs.next_version }}
publish_docker:
name: Publish to Docker Hub
uses: ./.github/workflows/publish-docker.yml
needs: [version]
if: ${{ needs.version.outputs.next_version != needs.version.outputs.previous_version }}
secrets: inherit
with:
version: ${{ needs.version.outputs.next_version }}