From 77d86a7bfa086cf12aa3bf74925f0ad70dc355c1 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 16 Apr 2024 16:55:53 +0200 Subject: [PATCH] Test create-pull-request --- .github/workflows/release.yml | 48 +++++++---------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b78354..9a93e31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,45 +2,23 @@ name: CD on: push: branches: - - main + - test-create-pr jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v26 - - - name: release - run: scripts/release.sh - env: - GH_TOKEN: ${{ github.token }} - nixpkgs-pr: runs-on: ubuntu-latest - needs: release steps: - uses: actions/checkout@v4 with: - repository: NixOS/nixpkgs + repository: tweag/nixpkgs - - name: Get the Nixpkgs rev - run: echo "rev=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - name: Get version before - run: echo "before=$(> $GITHUB_ENV - - - name: Update the version + - name: Update something # We run bash explicitly instead of using the files shebang, # because the shebang is using nix-shell with dependencies we already have by default - run: bash pkgs/test/check-by-name/update-pinned-tool.sh - - - name: Get version after - run: echo "after=$(> $GITHUB_ENV + run: "echo foo >> README.md" - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@branch-fetch-depth with: # To trigger CI for automated PRs, we use a separate machine account # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs @@ -49,15 +27,7 @@ jobs: push-to-fork: infinixbot/nixpkgs committer: infinixbot author: infinixbot - branch: update/nixpkgs-check-by-name - commit-message: | - nixpkgs-check-by-name: ${{ env.before }} -> ${{ env.after }} - - https://github.com/NixOS/nixpkgs-check-by-name/releases/tag/${{ env.after }} - title: "nixpkgs-check-by-name: ${{ env.before }} -> ${{ env.after }}" - body: > - This is an automated PR to update the version of [nixpkgs-check-by-name](https://github.com/NixOS/nixpkgs-check-by-name), - which is used by CI to [check the `pkgs/by-name`](https://github.com/NixOS/nixpkgs/tree/${{ env.rev }}/pkgs/by-name#validation) directory. - The update was performed by running [`pkgs/test/check-by-name/update-pinned-tool.sh`](https://github.com/NixOS/nixpkgs/tree/${{ env.rev }}/pkgs/test/check-by-name#update-pinned-toolsh). - - This PR updates the tool to [version ${{ env.after }}](https://github.com/NixOS/nixpkgs-check-by-name/releases/tag/${{ env.after }}). + branch: test-some-change + commit-message: Some change + title: Some change + body: Some change