From 848c8855c468b938ed53cb80b237c44d26a75de6 Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Tue, 18 Jun 2024 18:54:43 -0700 Subject: [PATCH 1/2] Add action to tag on allwpilib tag dispatch Adapted from robotpy --- .github/workflows/bump.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/bump.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 0000000..3735a09 --- /dev/null +++ b/.github/workflows/bump.yml @@ -0,0 +1,23 @@ +--- +name: bump + +on: [repository_dispatch] + +jobs: + bump: + if: github.event_name == 'repository_dispatch' && github.event.action == 'tag' + runs-on: ubuntu-latest + steps: + - name: Information + run: | + echo "Version update for ${{ github.event.client_payload.package_name }} -> ${{ github.event.client_payload.package_version }} requested" + - uses: actions/checkout@v4 + with: + token: ${{ secrets.REPO_ACCESS_TOKEN }} + fetch-depth: 0 + + - name: Tag and push + shell: bash + run: | + git tag ${{ github.event.client_payload.package_version }} + git push origin ${{ github.event.client_payload.package_version }} \ No newline at end of file From 9512a4f85608651f3f8486f8605fd81ab55c797d Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Fri, 21 Jun 2024 18:02:46 -0700 Subject: [PATCH 2/2] Update secret name --- .github/workflows/bump.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 3735a09..0fec170 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -13,11 +13,11 @@ jobs: echo "Version update for ${{ github.event.client_payload.package_name }} -> ${{ github.event.client_payload.package_version }} requested" - uses: actions/checkout@v4 with: - token: ${{ secrets.REPO_ACCESS_TOKEN }} + token: ${{ secrets.TOOL_REPO_ACCESS_TOKEN }} fetch-depth: 0 - name: Tag and push shell: bash run: | git tag ${{ github.event.client_payload.package_version }} - git push origin ${{ github.event.client_payload.package_version }} \ No newline at end of file + git push origin ${{ github.event.client_payload.package_version }}