Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/release-version-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update version.json and create PR

on:
release:
types: [published]

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get release information
id: get_release
uses: dawidd6/action-get-latest-release@v3
with:
release: true

- name: Update version.json
run: |
echo '{
"tag_name": "${{ steps.get_release.outputs.tag_name }}",
"release_name": "${{ steps.get_release.outputs.name }}",
"published_at": "${{ steps.get_release.outputs.published_at }}",
"body": "${{ steps.get_release.outputs.body }}"
"release_url": "${{ steps.get_release.outputs.html_url }}"
}' > version.json

- name: Create new branch
run: |
git checkout -b update-version-${{ steps.get_release.outputs.tag_name }}
git add version.json
git commit -m "Update version.json for release ${{ steps.get_release.outputs.tag_name }}"

- name: Push branch
run: |
git push origin update-version-${{ steps.get_release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-version-${{ steps.get_release.outputs.tag_name }}
title: "Update version.json for release ${{ steps.get_release.outputs.tag_name }}"
body: "This PR updates version.json with the latest release information."
base: develop # Target branch for the pull request
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/

ENV PYTHONUNBUFFERED 1


RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
# Poetry location so future commands (below) work

ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
RUN poetry config virtualenvs.create false
RUN poetry config virtualenvs.in-project false

COPY pyproject.toml ./
COPY pyproject.toml poetry.lock ./

# Install dependencies
RUN poetry install

RUN poetry lock
RUN poetry install

WORKDIR /app
Loading