Skip to content

Commit

Permalink
github-ci: pin checkout actions plus other fixups
Browse files Browse the repository at this point in the history
Pin checkout action plus other fixups from master to deal with changes
to the action.
  • Loading branch information
jasonish authored and victorjulien committed Apr 19, 2022
1 parent fca9c69 commit b589b05
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 23 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
path: ~/.cargo/registry
key: cargo-registry

- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748

# Prebuild check for duplicat SIDs
- name: Check for duplicate SIDs
Expand Down Expand Up @@ -359,7 +359,7 @@ jobs:
sudo \
which \
zlib-devel
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -435,7 +435,7 @@ jobs:
sudo \
which \
zlib-devel
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -502,7 +502,7 @@ jobs:
zlib1g \
zlib1g-dev \
exuberant-ctags
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -567,7 +567,7 @@ jobs:
zlib1g \
zlib1g-dev \
exuberant-ctags
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -692,7 +692,7 @@ jobs:
zlib1g \
zlib1g-dev \
exuberant-ctags
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -777,7 +777,7 @@ jobs:
run: |
add-apt-repository -y ppa:npalix/coccinelle
apt -y install coccinelle
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -856,7 +856,7 @@ jobs:
zlib1g \
zlib1g-dev
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -978,7 +978,7 @@ jobs:
- name: Install Rust
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION_KNOWN -y
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -1042,7 +1042,7 @@ jobs:
- name: Install Rust
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION_KNOWN -y
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down Expand Up @@ -1098,7 +1098,7 @@ jobs:
run: cargo install --force --debug --version 0.14.1 cbindgen
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: pip3 install PyYAML
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Downloading prep archive
uses: actions/download-artifact@v2
with:
Expand All @@ -1121,7 +1121,7 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
Expand All @@ -1131,7 +1131,7 @@ jobs:
# preinstalled one to be picked up by configure
- name: cbindgen
run: cargo install --root /usr --force --debug --version 0.14.1 cbindgen
- uses: actions/checkout@v2
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- uses: actions/download-artifact@v2
with:
name: prep
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ name: commit-check
on:
- pull_request

permissions: read-all

env:
DEBIAN_FRONTEND: "noninteractive"

jobs:

check-commits:
name: Commit Check
runs-on: ubuntu-latest
container: ubuntu:18.04
container: ubuntu:20.04
steps:
- name: Caching ~/.cargo
uses: actions/cache@v1
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ~/.cargo
key: commit-check-cargo
Expand Down Expand Up @@ -42,7 +47,7 @@ jobs:
libhiredis-dev \
libjansson-dev \
libevent-dev \
libevent-pthreads-2.1.6 \
libevent-pthreads-2.1-7 \
libjansson-dev \
libpython2.7 \
libssl-dev \
Expand All @@ -59,7 +64,11 @@ jobs:
- name: Install cbindgen
run: cargo install cbindgen
- run: echo $PATH
- uses: actions/checkout@v1
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
fetch-depth: 0
# The action above is supposed to do this for us, but it doesn't appear to stick.
- run: /usr/bin/git config --global --add safe.directory /__w/suricata/suricata
- run: git fetch
- run: git clone https://github.com/OISF/libhtp -b 0.5.x
- name: Building all commits
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ on:
- 'master-*'
pull_request:

permissions: read-all

env:
DEBIAN_FRONTEND: "noninteractive"

jobs:

# Checking for correct formatting of branch for C code changes
check-formatting:
name: Formatting Check (clang 9)
runs-on: ubuntu-18.04
container: ubuntu:18.04
continue-on-error: true
runs-on: ubuntu-20.04
container: ubuntu:20.04
continue-on-error: false
steps:

# Cache Rust stuff.
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ~/.cargo/registry
key: cargo-registry
Expand Down Expand Up @@ -81,15 +86,18 @@ jobs:
# My patience simply ran too short to keep on looking. See follow-on
# action to manually fix this up.
- name: Checkout - might be merge commit!
uses: actions/checkout@v1
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
with:
fetch-depth: 0
# Use last commit of branch, not potential merge commit!
#
# This works perfectly well on pull requests within forked repos, but
# not for pull requests from forks to the OISF repo as the latter one
# does not know the branch (from the forked repo). Argh.
# with:
# ref: ${{ github.head_ref }} # check out branch

# The action above is supposed to do this for us, but it doesn't appear to stick.
- run: /usr/bin/git config --global --add safe.directory /__w/suricata/suricata
# Manually ignore the merge commit as none of the with/ref things tried
# with actions/checkout seemed to work for pull requests from forks into
# the OISF repo.
Expand Down

0 comments on commit b589b05

Please sign in to comment.