Skip to content

Commit 2d83d8c

Browse files
committed
update workflows
1 parent 0d3336b commit 2d83d8c

2 files changed

Lines changed: 29 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
required: false
1818
default: false
1919

20-
run-name: CI: Build and test mgconsole
20+
run-name: "CI: Build and test mgconsole"
2121

2222
jobs:
2323
build_and_test_ubuntu:
@@ -28,16 +28,19 @@ jobs:
2828
run: |
2929
docker pull memgraph/memgraph:latest
3030
echo "MEMGRAPH_IMAGE=memgraph/memgraph:latest" >> $GITHUB_ENV
31-
- uses: actions/checkout@v4
31+
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
3234
- name: Install and test mgconsole
3335
run: |
3436
cmake -B build -G Ninja -DMEMGRAPH_USE_DOCKER=ON -DMEMGRAPH_DOCKER_IMAGE=$MEMGRAPH_IMAGE
3537
cmake --build build
3638
sudo cmake --install build
3739
ctest --verbose --test-dir build
40+
3841
- name: Save mgconsole test results
3942
if: always()
40-
uses: actions/upload-artifact@v4
43+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4144
with:
4245
name: "mgconsole_ctest.log"
4346
path: build/Testing/Temporary/LastTest.log
@@ -50,8 +53,9 @@ jobs:
5053
shell: msys2 {0}
5154
steps:
5255
- name: Set-up repository
53-
uses: actions/checkout@v4
54-
- uses: msys2/setup-msys2@v2
56+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
58+
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
5559
with:
5660
msystem: MINGW64
5761
update: true
@@ -60,13 +64,15 @@ jobs:
6064
mingw-w64-x86_64-toolchain
6165
mingw-w64-x86_64-cmake
6266
mingw-w64-x86_64-openssl
67+
6368
- name: Build and install mgconsole
6469
run: |
6570
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release .
6671
cmake --build build --parallel
6772
cmake --install build
73+
6874
- name: Save mgconsole Windows build
69-
uses: actions/upload-artifact@v4
75+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
7076
with:
7177
name: "mgconsole Windows build"
7278
path: build/src/mgconsole.exe
@@ -76,19 +82,22 @@ jobs:
7682
runs-on: macos-latest
7783
steps:
7884
- name: Set-up repository
79-
uses: actions/checkout@v4
85+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8086
# NOTE: CI can't execute end2end tests because there is no way to run
8187
# Memgraph on CI MacOS machines.
88+
8289
- name: Install openssl
8390
run: |
8491
brew update
8592
brew install openssl
93+
8694
- name: Build mgconsole
8795
run: |
8896
cmake -B build -G Ninja -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release .
8997
cmake --build build
98+
9099
- name: Save mgconsole MacOS build
91-
uses: actions/upload-artifact@v4
100+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
92101
with:
93102
name: "mgconsole MacOS build"
94103
path: build/src/mgconsole
@@ -102,14 +111,14 @@ jobs:
102111
arch: [X64, ARM64]
103112
runs-on: [self-hosted, Linux, "${{ matrix.arch }}" ]
104113
steps:
105-
- uses: actions/checkout@v4
114+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106115

107116
- name: build mgconsole static
108117
run: |
109118
./build-generic-linux.sh
110119
111120
- name: Save mgconsole static build
112-
uses: actions/upload-artifact@v4
121+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
113122
with:
114123
name: "mgconsole static Linux build ${{ matrix.arch }}"
115124
path: build/generic/mgconsole

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434

3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v2
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3838

3939
- name: Set up Docker Buildx
40-
uses: docker/setup-buildx-action@v2
40+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
4141

4242
- name: Log in to Docker Hub
43-
uses: docker/login-action@v2
43+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
4444
with:
4545
username: ${{ secrets.DOCKER_USERNAME }}
4646
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -62,7 +62,7 @@ jobs:
6262
fi
6363
6464
- name: Build and push Docker image
65-
uses: docker/build-push-action@v4
65+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6666
with:
6767
context: .
6868
push: true
@@ -71,7 +71,6 @@ jobs:
7171
${{ env.DOCKER_ORGANIZATION_NAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest
7272
platforms: linux/amd64,linux/arm64
7373

74-
7574
- name: Verify Docker image
7675
run: |
7776
docker run --rm $DOCKER_ORGANIZATION_NAME/$DOCKER_REPOSITORY_NAME:${{ github.event.inputs.version }} --version
@@ -90,7 +89,6 @@ jobs:
9089
- name: Checkout repository
9190
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9291

93-
9492
- name: Login to AWS
9593
uses: aws-actions/configure-aws-credentials@f7b8181755fc1413cd909cbac860d8a76dc848f1 # v6.0.2
9694
with:
@@ -99,25 +97,25 @@ jobs:
9997
aws-region: eu-west-1
10098

10199
- name: Download artifacts Linux X64
102-
uses: actions/download-artifact@v4
100+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
103101
with:
104102
name: "mgconsole static Linux build X64"
105103
path: temp-linux-x64
106104

107105
- name: Download artifacts Linux ARM64
108-
uses: actions/download-artifact@v4
106+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
109107
with:
110108
name: "mgconsole static Linux build ARM64"
111109
path: temp-linux-arm64
112110

113111
- name: Download artifacts MacOS
114-
uses: actions/download-artifact@v4
112+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
115113
with:
116114
name: "mgconsole MacOS build"
117115
path: temp-macos
118116

119117
- name: Download artifacts Windows
120-
uses: actions/download-artifact@v4
118+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
121119
with:
122120
name: "mgconsole Windows build"
123121
path: temp-windows
@@ -152,6 +150,7 @@ jobs:
152150
git tag $TAG
153151
git push origin $TAG
154152
153+
# TODO(matt): this action is archived, we should probably find a suitable replacement
155154
- name: Create GitHub Release
156155
id: create_release
157156
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
@@ -170,6 +169,7 @@ jobs:
170169
tar -czvf mgconsole-${{ env.TAG }}-macos.tar.gz -C macos mgconsole
171170
tar -czvf mgconsole-${{ env.TAG }}-windows.tar.gz -C windows mgconsole.exe
172171
172+
# TODO(matt): this action is archived, we should probably find a suitable replacement
173173
- name: Upload binaries to Release Linux X64
174174
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
175175
env:

0 commit comments

Comments
 (0)