mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Fix packagecloud push skip for alpha/beta/rc (#2256)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
parent
eecf4f3c85
commit
85dc2615ad
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to Github Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
if: startsWith(inputs.tag, 'v')
|
if: startsWith(inputs.tag, 'v')
|
||||||
with:
|
with:
|
||||||
@ -70,18 +70,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check eligibility for archive push
|
|
||||||
id: archive
|
|
||||||
run: |
|
|
||||||
PUSH_ARCHIVE=$(
|
|
||||||
[[
|
|
||||||
"${{ inputs.prerelease }}" == "true" &&
|
|
||||||
("${{ steps.validate_tag.outputs.IS_TAG_ON_MAIN }}" == "true" ||
|
|
||||||
"${{ steps.validate_tag.outputs.IS_TAG_ON_VERSION }}" == "true")
|
|
||||||
]] && echo false || echo true
|
|
||||||
)
|
|
||||||
echo "PUSH_ARCHIVE=${PUSH_ARCHIVE}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Determine Go version
|
- name: Determine Go version
|
||||||
id: go
|
id: go
|
||||||
uses: ./.github/actions/go-version
|
uses: ./.github/actions/go-version
|
||||||
@ -151,7 +139,7 @@ jobs:
|
|||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Upload Debian packages to PackageCloud
|
- name: Upload Debian packages to PackageCloud
|
||||||
if: startsWith(inputs.tag, 'v') && steps.archive.outputs.PUSH_ARCHIVE
|
if: startsWith(inputs.tag, 'v') && "${{ inputs.prerelease }}" != "true"
|
||||||
uses: computology/packagecloud-github-action@v0.6
|
uses: computology/packagecloud-github-action@v0.6
|
||||||
with:
|
with:
|
||||||
PACKAGE-NAME: dist/*.deb
|
PACKAGE-NAME: dist/*.deb
|
||||||
@ -160,7 +148,7 @@ jobs:
|
|||||||
PACKAGECLOUD-DISTRO: any/any
|
PACKAGECLOUD-DISTRO: any/any
|
||||||
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
||||||
- name: Upload RPM packages to PackageCloud
|
- name: Upload RPM packages to PackageCloud
|
||||||
if: startsWith(inputs.tag, 'v') && steps.archive.outputs.PUSH_ARCHIVE
|
if: startsWith(inputs.tag, 'v') && "${{ inputs.prerelease }}" != "true"
|
||||||
uses: computology/packagecloud-github-action@v0.6
|
uses: computology/packagecloud-github-action@v0.6
|
||||||
with:
|
with:
|
||||||
PACKAGE-NAME: dist/*.rpm
|
PACKAGE-NAME: dist/*.rpm
|
||||||
|
Loading…
Reference in New Issue
Block a user