diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5773a8e..963c17e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,6 +2,9 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/python { "name": "Python Learning Codespace", + "hostRequirements": { + "cpus": 2 + }, // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "build": { diff --git a/.github/workflows/pull_upstream.yml b/.github/workflows/pull_upstream.yml deleted file mode 100644 index 84519e4..0000000 --- a/.github/workflows/pull_upstream.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Update configuration - -on: - - workflow_dispatch: - - schedule: - - cron: '0 1 * * 1' ## At 01:00 AM on every Monday - - -jobs: - - pull_upstream: - - # To enable updates, set this to the name of your repository: - if: github.repository == 'kostrykin/python-learning-codespace' - - runs-on: ubuntu-latest - - permissions: write-all - - steps: - - - uses: actions/checkout@v4 - - - uses: fregante/setup-git-user@v2 - - - name: Create branch for merging - shell: bash - run: | - git checkout -b pull_upstream - - - name: Add remote for upstream - shell: bash - run: | - git remote add upstream https://github.com/kostrykin/python-learning-codespace - git fetch upstream - - - name: Merge (squash) - continue-on-error: true - shell: bash - run: | - git merge upstream/master --allow-unrelated-histories --squash - - - name: List files with merge conflicts - shell: bash - run: | - echo "Please resolve merge conflicts within the following files:" >> .pr-body.md - git diff --name-only --diff-filter=U --relative | awk '{print "- " $0}' >> .pr-body.md - - - name: Commit - id: commit - continue-on-error: true - shell: bash - run: | - git commit -a -m "Update configuration" - - - name: Push - if: steps.commit.outcome == 'success' - shell: bash - run: | - git push origin pull_upstream - - - name: Create pull request - if: steps.commit.outcome == 'success' - shell: bash - run: | - gh pr create --fill --body-file ".pr-body.md" --base ${{ github.ref_name }} --head pull_upstream - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 7decffa..6cf4714 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,7 @@ Dotfiles `**/.*`, Markdown files `**/*.md` are some other auxiliary files (e.g., **To update your existing repository with this template:** -Install the auto-updater workflow: +This command will fetch the latest `.devcontainer` and overwrite: ```bash -mkdir -p .github/workflows && wget https://github.com/kostrykin/python-learning-codespace/raw/master/.github/workflows/pull_upstream.yml -O .github/workflows/pull_upstream.yml +mkdir -p .devcontainer && wget https://github.com/kostrykin/python-learning-codespace/raw/master/.devcontainer/devcontainer.json -O .devcontainer/devcontainer.json && wget https://github.com/kostrykin/python-learning-codespace/raw/master/.devcontainer/Dockerfile -O .devcontainer/Dockerfile ``` - -Run the workflow from the web interface and merge the created pull request. \ No newline at end of file