Skip to content

Repository files navigation

Get Latest Release

A simple Github action to get the latest release from another repository. No authentication required.

Configuration

Example Repository - https://github.com/pozetroninc/github-action-get-latest-release

Inputs

NameDescriptionExample
ownerThe Github user or organization that owns the repositorypozetroninc
repoThe repository namegithub-action-get-latest-release

or

NameDescriptionExample
repositoryThe repository name in fullpozetroninc/github-action-get-latest-release

Additional Inputs (Optional)

NameDescriptionExample
excludesExclude draft or pre-release versions."prerelease, draft"
tokenGitHub token or personal access token${{ secrets.GITHUB_TOKEN }} or ${{ secrets.PERSONAL_ACCESS_TOKEN }}

Using the GITHUB_TOKEN will avoid the action failing due to hitting API rate limits from the IP address of the GitHub runner your action is running on. Using a PERSONAL_ACCESS_TOKEN is required to get the release information from a private repo. You can read about how to create a personal access token here and how to add this as a repository secret here.

Outputs

NameDescriptionExample
releaseThe latest release version tagv0.3.0
idThe latest release version id12345
descriptionThe latest release description bodyThis is an example release

Usage Example

name: Build Docker Imageson: [push, repository_dispatch]jobs:
build:
name: RedisTimeSeriesruns-on: ubuntu-lateststeps:
- id: keydbuses: pozetroninc/github-action-get-latest-release@masterwith:
owner: JohnSullyrepo: KeyDBexcludes: prerelease, draft
- id: timeseriesuses: pozetroninc/github-action-get-latest-release@masterwith:
repository: RedisTimeSeries/RedisTimeSeries
- uses: actions/checkout@v3
- uses: docker/build-push-action@v3with:
username: ${{ secrets.DOCKER_USERNAME }}password: ${{ secrets.DOCKER_PASSWORD }}repository: pozetroninc/keydb-timeseriesdockerfile: timeseries.dockerfilebuild_args: KEY_DB_VERSION=${{ steps.keydb.outputs.release }}, REDIS_TIME_SERIES_VERSION=${{ steps.timeseries.outputs.release }}tags: latest, ${{ steps.keydb.outputs.release }}_${{ steps.timeseries.outputs.release }}

To use the current repo:

with:
repository: ${{ github.repository }}

To use authentication token:

with:
token: ${{ secrets.GITHUB_TOKEN }}

About

A Github action to get the latest release from another repository.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages