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

Update ORAS_VERSION to v1.2.0 #2

Open
wants to merge 2 commits into
base: test-workflow-update-oras
Choose a base branch
from
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/update-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Update ORAS Version

on:
workflow_dispatch:

push:
branches:
- 'test-workflow-update-oras'

schedule:
- cron: '0 3 14 * *' # Run at 03:00 AM, every 14 days

jobs:
update-oras-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get latest ORAS version
id: get-latest-oras
run: |
latest_version=$(curl --silent "https://api.github.com/repos/oras-project/oras/releases/latest" | jq -r .tag_name)
echo "::set-output name=version::$latest_version"

- name: Update ORAS_VERSION in script
run: |
latest_version=${{ steps.get-latest-oras.outputs.version }}
sed -i "s/ORAS_VERSION=\${ORAS_VERSION:-[0-9.]*}/ORAS_VERSION=\${ORAS_VERSION:-$latest_version}/g" lib/functions/general/oci-oras.sh

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update ORAS_VERSION to ${{ steps.get-latest-oras.outputs.version }}"
branch: update-oras-version-${{ steps.get-latest-oras.outputs.version }}
title: "Update ORAS_VERSION to ${{ steps.get-latest-oras.outputs.version }}"
body: "This PR updates ORAS_VERSION to ${{ steps.get-latest-oras.outputs.version }}"
labels: update, automated pr
2 changes: 1 addition & 1 deletion lib/functions/general/oci-oras.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

function run_tool_oras() {
# Default version
ORAS_VERSION=${ORAS_VERSION:-0.16.0} # https://github.com/oras-project/oras/releases
ORAS_VERSION=${ORAS_VERSION:-v1.2.0} # https://github.com/oras-project/oras/releases
#ORAS_VERSION=${ORAS_VERSION:-"1.0.0-rc.1"} # https://github.com/oras-project/oras/releases

declare non_cache_dir="/armbian-tools/oras" # To deploy/reuse cached ORAS in a Docker image.
Expand Down