ci: Conditions for version tag event.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- "**"
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- "**"
|
||||||
@@ -95,6 +97,7 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
if: >
|
if: >
|
||||||
!failure() && !cancelled()
|
!failure() && !cancelled()
|
||||||
|
&& !contains(github.ref, 'refs/tags/v')
|
||||||
|
|
||||||
name: Lint
|
name: Lint
|
||||||
needs: [init] #needs: [init, deps]
|
needs: [init] #needs: [init, deps]
|
||||||
@@ -122,6 +125,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
if: >
|
if: >
|
||||||
!failure() && !cancelled()
|
!failure() && !cancelled()
|
||||||
|
&& !contains(github.ref, 'refs/tags/v')
|
||||||
|
|
||||||
name: Test
|
name: Test
|
||||||
needs: [init, lint]
|
needs: [init, lint]
|
||||||
|
|||||||
8
.github/workflows/package.yml
vendored
8
.github/workflows/package.yml
vendored
@@ -117,7 +117,7 @@ jobs:
|
|||||||
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
|
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
|
||||||
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
||||||
|
|
||||||
name: Distro Pkgs
|
name: Distro Packages
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
bake_targets: '["pkg-deb", "pkg-rpm"]'
|
bake_targets: '["pkg-deb", "pkg-rpm"]'
|
||||||
@@ -133,8 +133,8 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
artifact: >
|
artifact: >
|
||||||
{
|
{
|
||||||
"pkg-deb": {"dst": "tuwunel_1.0.0-1_amd64.deb"},
|
"pkg-deb": {"dst": "tuwunel.deb", "src": "tuwunel_1.0.0-1_amd64.deb"},
|
||||||
"pkg-rpm": {"dst": "tuwunel-1.0.0-1.x86_64.rpm"}
|
"pkg-rpm": {"dst": "tuwunel.rpm", "src": "tuwunel-1.0.0-1.x86_64.rpm"}
|
||||||
}
|
}
|
||||||
|
|
||||||
check_pkgs:
|
check_pkgs:
|
||||||
@@ -145,7 +145,7 @@ jobs:
|
|||||||
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
|
||||||
&& false
|
&& false
|
||||||
|
|
||||||
name: Check Pkgs
|
name: Check Packages
|
||||||
needs: [pkgs]
|
needs: [pkgs]
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
|
|||||||
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
@@ -65,7 +65,7 @@ jobs:
|
|||||||
!failure() && !cancelled()
|
!failure() && !cancelled()
|
||||||
&& inputs.machines
|
&& inputs.machines
|
||||||
&& inputs.docker_repo != ''
|
&& inputs.docker_repo != ''
|
||||||
&& (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/'))
|
&& (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v'))
|
||||||
|
|
||||||
name: Containers
|
name: Containers
|
||||||
runs-on: ${{matrix.machine}}
|
runs-on: ${{matrix.machine}}
|
||||||
@@ -115,8 +115,8 @@ jobs:
|
|||||||
acct: ${{github.actor}}
|
acct: ${{github.actor}}
|
||||||
repo: ${{github.repository}}
|
repo: ${{github.repository}}
|
||||||
docker_repo: ${{inputs.docker_repo}}
|
docker_repo: ${{inputs.docker_repo}}
|
||||||
docker_tag_latest: ${{ contains(github.ref, 'refs/tags/') && !contains(github.ref, '-rc') }}
|
docker_tag_latest: ${{ contains(github.ref, 'refs/tags/v') && !contains(github.ref, '-rc') }}
|
||||||
docker_tag_preview: ${{ contains(github.ref, 'refs/tags/') && contains(github.ref, '-rc') }}
|
docker_tag_preview: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, '-rc') }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
docker/bake.sh "${{matrix.bake_target}}"
|
docker/bake.sh "${{matrix.bake_target}}"
|
||||||
|
|||||||
Reference in New Issue
Block a user