Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-3066 Add setup-updatecli action #878

Merged
merged 4 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/setup-github-release-binary/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
description: 'Template for download url, can use VERSION/NAME/OS/ARCH env vars'
required: false
default: 'v${VERSION}/${NAME}_${VERSION}_${OS}_${ARCH}.tar.gz'
test_args:
description: 'Arguments to test the binary'
required: false
default: '--version'
runs:
using: "composite"
steps:
Expand All @@ -27,4 +31,4 @@ runs:
echo "Downloading $URL ..."
curl -fsSL $URL | tar xz $NAME
sudo mv $NAME /usr/local/bin/$NAME
echo $($NAME --version)
$NAME ${{ inputs.test_args }}
15 changes: 15 additions & 0 deletions .github/actions/setup-updatecli/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Setup updatecli'
description: 'Install updatecli binary'
inputs:
version:
description: 'Version of binary'
default: '0.93.0'
runs:
using: "composite"
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-github-release-binary@v8.11.0
with:
repo: updatecli/updatecli
version: ${{ inputs.version }}
url_template: 'v${VERSION}/${NAME}_${OS}_${ARCH}.tar.gz'
test_args: 'version'
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,14 @@ updates:
catch-all:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/.github/actions/setup-updatecli"
schedule:
interval: "weekly"
groups:
catch-all:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/.github/actions/slack-file-upload"
schedule:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,10 @@ jobs:
- uses: ./.github/actions/free-hosted-runner-disk-space
- name: Test if available disk size increased
run: test ${{ env.total_size_before }} -lt $(df --total --output=avail | tail -1)
- uses: ./.github/actions/setup-updatecli
- uses: ./.github/actions/setup-github-release-binary
with:
repo: updatecli/updatecli
version: 0.93.0
url_template: 'v${VERSION}/${NAME}_${OS}_${ARCH}.tar.gz'
test_args: 'version'
12 changes: 12 additions & 0 deletions .updatecli/values/github_releases/updatecli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github:
prefix: 'build(deps)'
message: 'bump updatecli to {{ source "lastRelease" }}'

github_release:
owner: 'updatecli'
repo: 'updatecli'

target:
file: '.github/actions/setup-updatecli/action.yml'
key: '$.inputs.version.default'
trimprefix: 'v'
11 changes: 11 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Here follows the list of GitHub Actions topics available in the current document
- [setup-rancher-cli](#setup-rancher-cli)
- [setup-terraform-docs](#setup-terraform-docs)
- [setup-updatebot](#setup-updatebot)
- [setup-updatecli](#setup-updatecli)
- [slack-file-upload](#slack-file-upload)
- [sonar-scanner](#sonar-scanner)
- [update-deployment-runtime-versions](#update-deployment-runtime-versions)
Expand Down Expand Up @@ -1658,6 +1659,16 @@ Install the updatebot binary from GitHub Releases and add it to the PATH.
version: "1.1.60"
```

### setup-updatecli

Install the updatecli binary from GitHub Releases and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-updatecli@ref
with:
version: "0.93.0" # omit to use the default version provided by the action
```

### slack-file-upload

Uploads a file to a Slack channel.
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.11.0
v8.12.0
Loading