Generate Latest Release JSON #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Latest Release JSON | |
on: | |
workflow_dispatch: | |
release: | |
types: [released, prereleased] | |
jobs: | |
generate_latest_release_json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout purple-hats repository | |
uses: actions/checkout@v3 | |
- name: Copy scripts to parent directory | |
run: | | |
cp .github/workflows/generate-release-catalog.sh ${{runner.temp}} | |
- name: Check if file exists | |
run: | | |
if [ -f ${{runner.temp}}/generate-release-catalog.sh ]; then | |
echo "File exists." | |
else | |
echo "File does not exist." | |
fi | |
- name: Checkout docs branch | |
uses: actions/checkout@v3 | |
with: | |
ref: 'docs' | |
- name: Check if file exists | |
run: | | |
if [ -f ${{runner.temp}}/generate-release-catalog.sh ]; then | |
echo "File exists." | |
else | |
echo "File does not exist." | |
fi | |
- name: Execute script to generate release catalog json | |
run: bash ${{runner.temp}}/generate-release-catalog.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout to purple-a11y-test repository | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository_owner }}/purple-a11y-test | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if file exists | |
run: | | |
if [ -f ${{runner.temp}}/generate-release-catalog.sh ]; then | |
echo "File exists." | |
else | |
echo "File does not exist." | |
fi | |
- name: Execute script to generate release catalog json | |
run: bash ${{runner.temp}}/generate-release-catalog.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |