Skip to content

Commit d364801

Browse files
vsilentCopilot
andcommitted
ci: upgrade deprecated GitHub Actions to v4
- actions/cache v2 → v4 - actions/upload-artifact v2 → v4 - actions/download-artifact v2 → v4 - actions/checkout v2 → v4 - docker/build-push-action v1 → v6 (+ docker/login-action v3) - github/codeql-action/upload-sarif v1 → v3 Fixes: deprecated action versions causing workflow failures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 72d7515 commit d364801

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

.github/workflows/codacy-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
# Checkout the repository to the GitHub Actions runner
2323
- name: Checkout code
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525

2626
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
2727
- name: Run Codacy Analysis CLI
@@ -41,6 +41,6 @@ jobs:
4141

4242
# Upload the SARIF file generated in the previous step
4343
- name: Upload SARIF results file
44-
uses: github/codeql-action/upload-sarif@v1
44+
uses: github/codeql-action/upload-sarif@v3
4545
with:
4646
sarif_file: results.sarif

.github/workflows/docker.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: [self-hosted, linux]
1717
steps:
1818
- name: Checkout sources
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020

2121
- name: Install stable toolchain
2222
uses: actions-rs/toolchain@v1
@@ -27,7 +27,7 @@ jobs:
2727
components: rustfmt, clippy
2828

2929
- name: Cache cargo registry
30-
uses: actions/cache@v2.1.6
30+
uses: actions/cache@v4
3131
with:
3232
path: ~/.cargo/registry
3333
key: docker-registry-${{ hashFiles('**/Cargo.lock') }}
@@ -36,7 +36,7 @@ jobs:
3636
docker-
3737
3838
- name: Cache cargo index
39-
uses: actions/cache@v2.1.6
39+
uses: actions/cache@v4
4040
with:
4141
path: ~/.cargo/git
4242
key: docker-index-${{ hashFiles('**/Cargo.lock') }}
@@ -49,7 +49,7 @@ jobs:
4949
head -c16 /dev/urandom > src/secret.key
5050
5151
- name: Cache cargo build
52-
uses: actions/cache@v2.1.6
52+
uses: actions/cache@v4
5353
with:
5454
path: target
5555
key: docker-build-${{ hashFiles('**/Cargo.lock') }}
@@ -102,15 +102,15 @@ jobs:
102102
# npm test
103103

104104
- name: Archive production artifacts
105-
uses: actions/upload-artifact@v2
105+
uses: actions/upload-artifact@v4
106106
with:
107107
name: dist-without-markdown
108108
path: |
109109
web/dist
110110
!web/dist/**/*.md
111111
112112
# - name: Archive code coverage results
113-
# uses: actions/upload-artifact@v2
113+
# uses: actions/upload-artifact@v4
114114
# with:
115115
# name: code-coverage-report
116116
# path: output/test/code-coverage.html
@@ -129,7 +129,7 @@ jobs:
129129
cd ..
130130
131131
- name: Upload app archive for Docker job
132-
uses: actions/upload-artifact@v2.2.2
132+
uses: actions/upload-artifact@v4
133133
with:
134134
name: artifact-linux-docker
135135
path: app.tar.gz
@@ -141,7 +141,7 @@ jobs:
141141
needs: cicd-linux-docker
142142
steps:
143143
- name: Download app archive
144-
uses: actions/download-artifact@v2
144+
uses: actions/download-artifact@v4
145145
with:
146146
name: artifact-linux-docker
147147

@@ -151,12 +151,14 @@ jobs:
151151
- name: Display structure of downloaded files
152152
run: ls -R
153153

154-
- name: Docker build and publish
155-
uses: docker/build-push-action@v1
154+
- name: Login to Docker Hub
155+
uses: docker/login-action@v3
156156
with:
157157
username: ${{ secrets.DOCKER_USERNAME }}
158158
password: ${{ secrets.DOCKER_PASSWORD }}
159-
repository: trydirect/stackdog
160-
add_git_labels: true
161-
tag_with_ref: true
162-
#no-cache: true
159+
160+
- name: Docker build and publish
161+
uses: docker/build-push-action@v6
162+
with:
163+
push: true
164+
tags: trydirect/stackdog:latest

0 commit comments

Comments
 (0)