mirror of https://github.com/knative/func.git
ci: remove pkger from ci
This commit is contained in:
parent
f006ab1e32
commit
876b0dd0f7
|
@ -10,38 +10,17 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- name: Determine download URL for pkger
|
||||
id: pkger-download-url
|
||||
uses: actions/github-script@v2
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
return github.repos.getReleaseByTag({
|
||||
owner: "markbates",
|
||||
repo: "pkger",
|
||||
tag: "v0.17.1"
|
||||
}).then(result => {
|
||||
return result.data.assets
|
||||
.filter(a => a.name.includes('Linux_x86'))
|
||||
.map(a => a.browser_download_url)[0];
|
||||
})
|
||||
- name: Install pkger
|
||||
run: |
|
||||
curl -s -L -o pkger.tgz ${{ steps.pkger-download-url.outputs.result }}
|
||||
tar xvzf pkger.tgz
|
||||
- name: Test
|
||||
run: make test
|
||||
env:
|
||||
PKGER: "./${{ steps.pkger-binaries.outputs.binary }}"
|
||||
- name: Lint
|
||||
run: make check
|
||||
outputs:
|
||||
pkger: ${{ steps.pkger-download-url.outputs.result }}
|
||||
|
||||
build-and-publish:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-go@v2
|
||||
- uses: actions/checkout@v2
|
||||
# Create a release, or update the release PR
|
||||
- uses: GoogleCloudPlatform/release-please-action@v2.24.1
|
||||
id: release
|
||||
|
@ -49,8 +28,6 @@ jobs:
|
|||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release-type: simple
|
||||
bump-minor-pre-major: true
|
||||
# Checkout
|
||||
- uses: actions/checkout@v2
|
||||
# Tag
|
||||
# If a release was created, tag `vX.Y.Z` synchronously which:
|
||||
# 1. Triggers release-please to create draft release, allowing manual
|
||||
|
@ -70,26 +47,18 @@ jobs:
|
|||
git push origin :v${{steps.release.outputs.major}}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}} || true
|
||||
git tag -a v${{steps.release.outputs.major}}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}} -m "Release v${{steps.release.outputs.major}}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}}"
|
||||
git push origin v${{steps.release.outputs.major}}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}} || true
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
- name: Install pkger
|
||||
run: |
|
||||
curl -s -L -o pkger.tgz ${{ needs.test.outputs.pkger }}
|
||||
tar xvzf pkger.tgz
|
||||
|
||||
# Standard build tasks
|
||||
- name: Build
|
||||
run: make cross-platform
|
||||
env:
|
||||
PKGER: "./pkger"
|
||||
# NOTE:
|
||||
# release-please adds the version asynchronously. Without using the
|
||||
# synchonous tagging step above, the version can be explicitly passed
|
||||
# to the build using the following environment variable. However this
|
||||
# has the side-effect of causing inter-relese binaries to not include
|
||||
# verbose version information, because the special version `tip` is
|
||||
# overriden with a blank string in those cases.
|
||||
# VERS: ${{ steps.release.outputs.tag_name }}
|
||||
# NOTE:
|
||||
# release-please adds the version asynchronously. Without using the
|
||||
# synchonous tagging step above, the version can be explicitly passed
|
||||
# to the build using the following environment variable. However this
|
||||
# has the side-effect of causing inter-relese binaries to not include
|
||||
# verbose version information, because the special version `tip` is
|
||||
# overriden with a blank string in those cases.
|
||||
# env:
|
||||
# VERS: ${{ steps.release.outputs.tag_name }}
|
||||
|
||||
# Upload all build artifacts whether it's a release or not
|
||||
- uses: actions/upload-artifact@v2
|
||||
|
|
|
@ -12,61 +12,10 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- name: Determine platform binaries
|
||||
id: pkger-binaries
|
||||
uses: actions/github-script@v2
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
let platform, binary;
|
||||
switch ('${{matrix.os}}') {
|
||||
case 'ubuntu-latest':
|
||||
platform = 'Linux_x86'
|
||||
binary = 'pkger'
|
||||
break
|
||||
case 'windows-latest':
|
||||
platform = 'Windows_x86'
|
||||
binary = 'pkger.exe'
|
||||
break
|
||||
case 'macos-latest':
|
||||
platform = 'Darwin_x86'
|
||||
binary = 'pkger'
|
||||
break
|
||||
}
|
||||
core.setOutput('platform', platform)
|
||||
core.setOutput('binary', binary)
|
||||
- name: Determine download URL for latest pkger
|
||||
id: pkger-download-url
|
||||
uses: actions/github-script@v2
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
let platform = "${{ steps.pkger-binaries.outputs.platform }}"
|
||||
let binary = "${{ steps.pkger-binaries.outputs.binary }}"
|
||||
core.info('PLATFORM: ' + platform)
|
||||
core.info('BINARY: ' + binary)
|
||||
return github.repos.getReleaseByTag({
|
||||
owner: "markbates",
|
||||
repo: "pkger",
|
||||
tag: "v0.17.1"
|
||||
}).then(result => {
|
||||
return result.data.assets
|
||||
.filter(a => a.name.includes(platform))
|
||||
.map(a => a.browser_download_url)[0];
|
||||
})
|
||||
- name: Install pkger
|
||||
run: |
|
||||
curl -s -L -o pkger.tgz ${{ steps.pkger-download-url.outputs.result }}
|
||||
tar xvzf pkger.tgz
|
||||
|
||||
- name: Test
|
||||
run: make test
|
||||
env:
|
||||
PKGER: "./${{ steps.pkger-binaries.outputs.binary }}"
|
||||
- name: Build
|
||||
run: make build
|
||||
env:
|
||||
PKGER: "./${{ steps.pkger-binaries.outputs.binary }}"
|
||||
- name: Lint
|
||||
run: make check
|
||||
|
||||
|
|
Loading…
Reference in New Issue