check updates #177
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check updates | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "26 3 * * 1" # every monday at 3:26AM | |
jobs: | |
check-updates: | |
name: check updates | |
runs-on: ubuntu-latest | |
outputs: | |
update-available: ${{ steps.check-update.outputs.update-available }} | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- name: install xmlstarlet | |
run: sudo apt-get install -qqy xmlstarlet | |
- id: check-update | |
name: compare current versions checksums | |
run: ./.github/check-update.jdbc.sh || echo "::set-output name=update-available::true" | |
open-pr: | |
name: open pull request | |
needs: | |
- check-updates | |
if: needs.check-updates.outputs.update-available == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- name: install nix | |
uses: cachix/install-nix-action@v16 | |
with: | |
nix_path: nixpkgs=channel:nixos-22.05 | |
- env: | |
GPG_PASSPHRASE_JDK6: ${{ secrets.GPG_PASSPHRASE_JDK6 }} | |
run: ./.github/fetch-jdk6.sh | |
- name: update sources | |
run: nix-shell --run "./.github/update-sources.jdbc.sh" | |
- name: validate build | |
run: nix-shell --pure --run "mvn -B package" | |
- name: commit and open pr | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: nix-shell --run "./.github/open-pr.sh 'JDBC drivers' 'libsrc/JDBCDriverType4'" |