From 8d3771f7fc6eb24aaf45773019c2c94550de87d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:32:06 +0000 Subject: [PATCH 1/6] Initial plan From 803683ed8a3882976fe729b69fc2668ad6594404 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:34:10 +0000 Subject: [PATCH 2/6] Convert Travis CI to GitHub Actions workflow Co-authored-by: physikerwelt <2777736+physikerwelt@users.noreply.github.com> --- .github/workflows/build.yml | 76 +++++++++++++++++++++++++++++++++++++ README.md | 11 ++---- support/commitPub.sh | 12 ++++-- support/commitPubDfg.sh | 12 ++++-- support/commitUp.sh | 12 ++++-- 5 files changed, 107 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6aec6b4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,76 @@ +name: Build and Deploy + +on: + push: + branches-ignore: + - 'build-**' + pull_request: + branches-ignore: + - 'build-**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python 3.6 + uses: actions/setup-python@v5 + with: + python-version: '3.6' + cache: 'pip' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y maven + pip install PyGithub + + - name: Cache TeX Live + uses: actions/cache@v4 + with: + path: | + /tmp/texlive + ~/.texlive + key: texlive-${{ runner.os }} + + - name: Install TeX Live + run: source ./support/texlive_install.sh + + - name: Decrypt GPG key + env: + encrypted_125c18bb9738_key: ${{ secrets.ENCRYPTED_125C18BB9738_KEY }} + encrypted_125c18bb9738_iv: ${{ secrets.ENCRYPTED_125C18BB9738_IV }} + run: | + openssl aes-256-cbc -K $encrypted_125c18bb9738_key -iv $encrypted_125c18bb9738_iv \ + -in bibbot.asc.enc -out bibbot.asc -d + + - name: Compile + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: source ./support/compile.sh + + - name: Create Git Tag and Deploy Info + if: success() + id: tag_info + run: | + export GIT_TAG=build-${{ github.ref_name }}-$(date -u "+%Y-%m-%d")-${{ github.run_number }} + echo "tag_name=$GIT_TAG" >> $GITHUB_OUTPUT + git tag $GIT_TAG -a -m "Generated tag from GitHub Actions build ${{ github.run_number }}" + + - name: Deploy to GitHub Releases + if: success() && github.event_name == 'push' && github.repository == 'ag-gipp/bib' + uses: softprops/action-gh-release@v2 + with: + files: | + main.pdf + gipp.bib + docs/publist.html + docs/pubDFG.html + tag_name: ${{ steps.tag_info.outputs.tag_name }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index e9d0a1e..4988497 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# bib [![Build Status](https://travis-ci.com/ag-gipp/bib.svg?branch=master)](https://travis-ci.com/ag-gipp/bib) +# bib ![Build Status](https://github.com/ag-gipp/bib/actions/workflows/build.yml/badge.svg) This repo contains publications from ag-gipp. Biblography @@ -13,12 +13,9 @@ compare the contents of both files and overwrite `gipp.bib` with `gipp_bibertool.bib`. ## Automatic release configuration -See the [travis manual](https://docs.travis-ci.com/user/deployment/releases/) to understand the release section of the [travis config](.travis.yml) +See the [GitHub Actions documentation](https://docs.github.com/en/actions/deployment/releasing/releasing-automatically-with-github-actions) to understand the release section of the [GitHub Actions workflow](.github/workflows/build.yml) -For the interaction with GitHub independently from travis, we create +For the interaction with GitHub independently from GitHub Actions, we create a [personal access token](https://github.com/settings/tokens) and make -it available as environment variable -```bash -travis encrypt GITHUB_TOKEN= --add -``` +it available as repository secret named `GITHUB_TOKEN`. diff --git a/support/commitPub.sh b/support/commitPub.sh index e8c209a..10e260a 100755 --- a/support/commitPub.sh +++ b/support/commitPub.sh @@ -1,11 +1,17 @@ #!/usr/bin/env bash -echo "Travis: $TRAVIS, CI: $CI Travis build ID $TRAVIS_BUILD_ID" -[ -z "$TRAVIS" ] && exit 1 || echo "skip commit. Travis environment variable not set." +echo "CI: $CI, GitHub Actions: $GITHUB_ACTIONS, Run ID: $GITHUB_RUN_ID" +# Support both Travis and GitHub Actions +if [ -z "$TRAVIS" ] && [ -z "$GITHUB_ACTIONS" ]; then + echo "skip commit. CI environment variable not set." + exit 1 +fi gpg --import bibbot.asc git config --global user.email "bibbot@ckurs.de" git config --global user.name "BibBot" git config --global user.signingkey "1617C27854592471" git commit -S -m "Update publication list" docs/publist.html +# Use GitHub Actions branch reference if available, otherwise use Travis +BRANCH=${GITHUB_REF_NAME:-$TRAVIS_BRANCH} git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git -git push http HEAD:$TRAVIS_BRANCH +git push http HEAD:$BRANCH exit 1 diff --git a/support/commitPubDfg.sh b/support/commitPubDfg.sh index 10389d6..a77e743 100644 --- a/support/commitPubDfg.sh +++ b/support/commitPubDfg.sh @@ -1,11 +1,17 @@ #!/usr/bin/env bash -echo "Travis: $TRAVIS, CI: $CI Travis build ID $TRAVIS_BUILD_ID" -[ -z "$TRAVIS" ] && exit 1 || echo "skip commit. Travis environment variable not set." +echo "CI: $CI, GitHub Actions: $GITHUB_ACTIONS, Run ID: $GITHUB_RUN_ID" +# Support both Travis and GitHub Actions +if [ -z "$TRAVIS" ] && [ -z "$GITHUB_ACTIONS" ]; then + echo "skip commit. CI environment variable not set." + exit 1 +fi gpg --import bibbot.asc git config --global user.email "bibbot@ckurs.de" git config --global user.name "BibBot" git config --global user.signingkey "1617C27854592471" git commit -S -m "Update publication list" docs/pubDFG.html +# Use GitHub Actions branch reference if available, otherwise use Travis +BRANCH=${GITHUB_REF_NAME:-$TRAVIS_BRANCH} git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git -git push http HEAD:$TRAVIS_BRANCH +git push http HEAD:$BRANCH exit 1 diff --git a/support/commitUp.sh b/support/commitUp.sh index 89d8922..24e1ca7 100755 --- a/support/commitUp.sh +++ b/support/commitUp.sh @@ -1,12 +1,18 @@ #!/usr/bin/env bash mv gipp_bibertool.bib gipp.bib -echo "Travis: $TRAVIS, CI: $CI Travis build ID $TRAVIS_BUILD_ID" -[ -z "$TRAVIS" ] && exit 1 || echo "skip commit. Travis environment variable not set." +echo "CI: $CI, GitHub Actions: $GITHUB_ACTIONS, Run ID: $GITHUB_RUN_ID" +# Support both Travis and GitHub Actions +if [ -z "$TRAVIS" ] && [ -z "$GITHUB_ACTIONS" ]; then + echo "skip commit. CI environment variable not set." + exit 1 +fi gpg --import bibbot.asc git config --global user.email "bibbot@ckurs.de" git config --global user.name "BibBot" git config --global user.signingkey "1617C27854592471" git commit -S -m "Reformat bib file" gipp.bib +# Use GitHub Actions branch reference if available, otherwise use Travis +BRANCH=${GITHUB_REF_NAME:-$TRAVIS_BRANCH} git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git -git push http HEAD:$TRAVIS_BRANCH +git push http HEAD:$BRANCH exit 1 From 36657d16993c0ba0e4ef24e1b100a38c34731175 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:35:00 +0000 Subject: [PATCH 3/6] Add conditions for push vs PR events in workflow Co-authored-by: physikerwelt <2777736+physikerwelt@users.noreply.github.com> --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6aec6b4..ad0bac1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,7 @@ jobs: run: source ./support/texlive_install.sh - name: Decrypt GPG key + if: github.event_name == 'push' env: encrypted_125c18bb9738_key: ${{ secrets.ENCRYPTED_125C18BB9738_KEY }} encrypted_125c18bb9738_iv: ${{ secrets.ENCRYPTED_125C18BB9738_IV }} @@ -53,7 +54,7 @@ jobs: run: source ./support/compile.sh - name: Create Git Tag and Deploy Info - if: success() + if: success() && github.event_name == 'push' id: tag_info run: | export GIT_TAG=build-${{ github.ref_name }}-$(date -u "+%Y-%m-%d")-${{ github.run_number }} @@ -61,7 +62,7 @@ jobs: git tag $GIT_TAG -a -m "Generated tag from GitHub Actions build ${{ github.run_number }}" - name: Deploy to GitHub Releases - if: success() && github.event_name == 'push' && github.repository == 'ag-gipp/bib' + if: success() && github.event_name == 'push' && github.repository == 'gipplab/bib' uses: softprops/action-gh-release@v2 with: files: | From 110f540e81014951c6d48cf0555ff1665608330d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:35:57 +0000 Subject: [PATCH 4/6] Fix repository references and clarify GITHUB_TOKEN in README Co-authored-by: physikerwelt <2777736+physikerwelt@users.noreply.github.com> --- README.md | 8 +++++--- support/commitPub.sh | 2 +- support/commitPubDfg.sh | 2 +- support/commitUp.sh | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4988497..fe1226e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ compare the contents of both files and overwrite `gipp.bib` with ## Automatic release configuration See the [GitHub Actions documentation](https://docs.github.com/en/actions/deployment/releasing/releasing-automatically-with-github-actions) to understand the release section of the [GitHub Actions workflow](.github/workflows/build.yml) -For the interaction with GitHub independently from GitHub Actions, we create -a [personal access token](https://github.com/settings/tokens) and make -it available as repository secret named `GITHUB_TOKEN`. +The GITHUB_TOKEN is automatically provided by GitHub Actions and does not need manual configuration. + +For GPG-signed commits, the following repository secrets need to be added: +- `ENCRYPTED_125C18BB9738_KEY` - Encryption key for the GPG key +- `ENCRYPTED_125C18BB9738_IV` - Initialization vector for the GPG key diff --git a/support/commitPub.sh b/support/commitPub.sh index 10e260a..65b220c 100755 --- a/support/commitPub.sh +++ b/support/commitPub.sh @@ -12,6 +12,6 @@ git config --global user.signingkey "1617C27854592471" git commit -S -m "Update publication list" docs/publist.html # Use GitHub Actions branch reference if available, otherwise use Travis BRANCH=${GITHUB_REF_NAME:-$TRAVIS_BRANCH} -git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git +git remote add http https://${GITHUB_TOKEN}@github.com/gipplab/bib.git git push http HEAD:$BRANCH exit 1 diff --git a/support/commitPubDfg.sh b/support/commitPubDfg.sh index a77e743..cbf3bfe 100644 --- a/support/commitPubDfg.sh +++ b/support/commitPubDfg.sh @@ -12,6 +12,6 @@ git config --global user.signingkey "1617C27854592471" git commit -S -m "Update publication list" docs/pubDFG.html # Use GitHub Actions branch reference if available, otherwise use Travis BRANCH=${GITHUB_REF_NAME:-$TRAVIS_BRANCH} -git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git +git remote add http https://${GITHUB_TOKEN}@github.com/gipplab/bib.git git push http HEAD:$BRANCH exit 1 diff --git a/support/commitUp.sh b/support/commitUp.sh index 24e1ca7..ffdc85f 100755 --- a/support/commitUp.sh +++ b/support/commitUp.sh @@ -13,6 +13,6 @@ git config --global user.signingkey "1617C27854592471" git commit -S -m "Reformat bib file" gipp.bib # Use GitHub Actions branch reference if available, otherwise use Travis BRANCH=${GITHUB_REF_NAME:-$TRAVIS_BRANCH} -git remote add http https://${GITHUB_TOKEN}@github.com/ag-gipp/bib.git +git remote add http https://${GITHUB_TOKEN}@github.com/gipplab/bib.git git push http HEAD:$BRANCH exit 1 From b6c143b309555b82d1cb6921e6444fe686eb3c8e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:36:48 +0000 Subject: [PATCH 5/6] Add explicit permissions for GITHUB_TOKEN to improve security Co-authored-by: physikerwelt <2777736+physikerwelt@users.noreply.github.com> --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad0bac1..33e25c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write # Required for creating releases and pushing tags steps: - name: Checkout repository From dd3ca3d555cddbe8294db904bdef703a4902fb58 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:37:09 +0000 Subject: [PATCH 6/6] Fix build badge URL in README to use correct repository Co-authored-by: physikerwelt <2777736+physikerwelt@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe1226e..0a495e0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# bib ![Build Status](https://github.com/ag-gipp/bib/actions/workflows/build.yml/badge.svg) +# bib ![Build Status](https://github.com/gipplab/bib/actions/workflows/build.yml/badge.svg) This repo contains publications from ag-gipp. Biblography