Skip to content

Workflow file for this run

name: Workflow for Latest Release
on:
release:
types: [created]
jobs:
get-latest-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get latest release tag
id: latest-release
uses: actions/github-script@v7
with:
script: |
const response = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
});
return response.data.tag_name;
- name: Use latest release tag
run: |
echo "The latest release tag is ${{ steps.latest-release.outputs.result }}"
- name: Trigger Docker build workflow
uses: actions/github-script@v7
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'docker-image.yml',
ref: ${{ steps.latest-release.outputs.result }}
})