Skip to content

Commit 9b096da

Browse files
authored
Merge pull request #1163 from abhro/actions
Create dependabot.yml and update action versions
2 parents d355e8a + 25bad30 commit 9b096da

File tree

2 files changed

+47
-40
lines changed

2 files changed

+47
-40
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
echo "head_ref is: ${{ github.head_ref }}"
3232
echo "target repository is: ${{ github.repository }}"
3333
echo "head repository is: ${{ github.event.pull_request.head.repo.full_name }}"
34-
- uses: actions/checkout@v2
35-
- uses: julia-actions/setup-julia@v1
34+
- uses: actions/checkout@v4
35+
- uses: julia-actions/setup-julia@v2
3636
with:
3737
version: ${{ matrix.version }}
38-
- uses: julia-actions/cache@v1
38+
- uses: julia-actions/cache@v2
3939
- uses: julia-actions/julia-buildpkg@v1
4040
- uses: julia-actions/julia-runtest@v1
4141
- uses: julia-actions/julia-processcoverage@v1
@@ -61,13 +61,13 @@ jobs:
6161
os:
6262
- 'ubuntu-latest'
6363
steps:
64-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v4
6565
with:
6666
persist-credentials: false
67-
- uses: julia-actions/setup-julia@v1
67+
- uses: julia-actions/setup-julia@v2
6868
with:
6969
version: ${{ matrix.version }}
70-
- uses: julia-actions/cache@v1
70+
- uses: julia-actions/cache@v2
7171
- uses: julia-actions/julia-buildpkg@v1
7272
- uses: julia-actions/julia-runtest@v1
7373
env:
@@ -80,45 +80,45 @@ jobs:
8080
env:
8181
JULIA_PKG_SERVER: ""
8282
steps:
83-
- uses: actions/checkout@v2
83+
- uses: actions/checkout@v4
8484
with:
8585
persist-credentials: false
86-
- uses: julia-actions/setup-julia@v1
86+
- uses: julia-actions/setup-julia@v2
8787
with:
8888
version: '1'
8989
- run: |
90-
julia -e '
91-
function set_environment_variable(name::AbstractString, value::AbstractString)
92-
github_env = ENV["GITHUB_ENV"]
93-
touch(github_env)
94-
open(github_env, "a") do io
95-
println(io, "$(name)=$(value)")
96-
end
97-
end
98-
event_name = "${{ github.event_name }}"
99-
if event_name == "pull_request"
100-
base_ref = "${{ github.base_ref }}"
101-
head_ref = "${{ github.head_ref }}"
102-
base_repository = "${{ github.repository }}"
103-
head_repository = "${{ github.event.pull_request.head.repo.full_name }}"
104-
build_docs = (base_ref == "master") && (head_ref == "dev") && (base_repository == head_repository)
105-
elseif event_name == "push"
106-
ref = "${{ github.ref }}"
107-
build_docs = (ref == "refs/heads/master") || (startswith(ref, "refs/tags/"))
108-
elseif event_name == "schedule"
109-
build_docs = ref == "refs/heads/master"
110-
elseif event_name == "workflow_dispatch"
111-
build_docs = ref == "refs/heads/master"
112-
else
113-
build_docs = false
114-
end
115-
if build_docs
116-
@info("We will build the docs")
117-
set_environment_variable("BUILD_DOCS", "true")
118-
else
119-
@info("We will NOT build the docs")
120-
set_environment_variable("BUILD_DOCS", "false")
121-
end'
90+
function set_environment_variable(name::AbstractString, value::AbstractString)
91+
github_env = ENV["GITHUB_ENV"]
92+
touch(github_env)
93+
open(github_env, "a") do io
94+
println(io, "$(name)=$(value)")
95+
end
96+
end
97+
event_name = "${{ github.event_name }}"
98+
if event_name == "pull_request"
99+
base_ref = "${{ github.base_ref }}"
100+
head_ref = "${{ github.head_ref }}"
101+
base_repository = "${{ github.repository }}"
102+
head_repository = "${{ github.event.pull_request.head.repo.full_name }}"
103+
build_docs = (base_ref == "master") && (head_ref == "dev") && (base_repository == head_repository)
104+
elseif event_name == "push"
105+
ref = "${{ github.ref }}"
106+
build_docs = (ref == "refs/heads/master") || (startswith(ref, "refs/tags/"))
107+
elseif event_name == "schedule"
108+
build_docs = ref == "refs/heads/master"
109+
elseif event_name == "workflow_dispatch"
110+
build_docs = ref == "refs/heads/master"
111+
else
112+
build_docs = false
113+
end
114+
if build_docs
115+
@info("We will build the docs")
116+
set_environment_variable("BUILD_DOCS", "true")
117+
else
118+
@info("We will NOT build the docs")
119+
set_environment_variable("BUILD_DOCS", "false")
120+
end
121+
shell: julia --color=yes {0}
122122
- run: |
123123
if ENV["BUILD_DOCS"] == "true"
124124
using Pkg

0 commit comments

Comments
 (0)