-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (46 loc) · 1.84 KB
/
update-version.yml
File metadata and controls
47 lines (46 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
name: 'Update Version'
on:
push:
branches:
- '_update-deps/runtimeverification/rv-nix-tools'
workflow_dispatch:
# Stop in progress workflows on the same branch and same workflow to use latest committed code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-versions:
name: 'Update Dependency Versions'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
fetch-depth: 0
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email devops@runtimeverification.com
- name: 'Install Nix'
uses: cachix/install-nix-action@v31.5.1
with:
install_url: https://releases.nixos.org/nix/nix-2.30.1/install
extra_nix_config: |
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v16
with:
name: k-framework
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
- name: 'Update Nix flake inputs'
run: |
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
sed -i 's! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/[a-z0-9\.]*"! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/'"${RV_NIX_TOOLS_VERSION}"'"!' flake.nix
nix flake update
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true
- name: 'Push updates'
run: git push