Skip to content

Update product repo #34

Update product repo

Update product repo #34

Workflow file for this run

name: Update product repo
on:
workflow_dispatch:
inputs:
product:
description: 'Product repo to update'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- id: key
run: |
printf "name=%s_SSH_KEY\n" "$(
echo "${{ github.event.inputs.product }}" |
tr '[:lower:]-' '[:upper:]_'
)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: apple-open-source/${{ github.event.inputs.product }}
path: ${{ github.event.inputs.product }}
ssh-key: ${{ secrets[steps.key.outputs.name] }}
- name: Update ${{ github.event.inputs.product }} repo
run: |
cd "${{ github.event.inputs.product }}"
ref=$(git ls-remote --tags --sort="v:refname" | tail -n1 | cut -f2)
git fetch origin "$ref:$ref"
cd ..
PUSH_RELEASE=1 make "${{ github.event.inputs.product }}"