Skip to content

Create release pull request #22

Create release pull request

Create release pull request #22

Workflow file for this run

name: Create release pull request
on:
workflow_dispatch:
inputs:
version:
type: string
description: New version, in the form v0.4.x
required: true
permissions:
contents: write
pull-requests: write
env:
target_branch: rel/${{github.event.inputs.version}}
version: ${{github.event.inputs.version}}
jobs:
update_manifest_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install devcontainers CLI
run: npm i -g @devcontainers/cli
- name: Update manifest files
run: ./build/prepare-release.sh
- name: Push manifest updates
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
git config --global user.email github-actions@github.com
git config --global user.name github-actions
git checkout -b ${{ env.target_branch }}
git add -A
git commit -m "Release manifest update"
git push origin ${{ env.target_branch }}
- name: Create pull request
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/${GITHUB_REPOSITORY}/pulls \
-f title="[Monthly Release] ${{ env.version }}" \
-f body="" \
-f head="${{ env.target_branch }}" \
-f base='main'
image-info:
name: Trigger info extraction
needs: [update_manifest_files]
uses: devcontainers/images/.github/workflows/version-history.yml@arausell/release-automation
permissions:
contents: write
pull-requests: write
with:
release: "${{ github.ref }}"
cg: "false"
push: "true"
overwrite: "false"
target_branch: rel/${{ github.event.inputs.version }}
secrets: inherit