Skip to content

Commit 815aef1

Browse files
committed
fixing action runner file
1 parent beada63 commit 815aef1

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

.github/workflows/docker-build.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ name: cpp_tutorial CI and Release
22

33
on:
44
push:
5-
branches: [ main, master, develop ] # Trigger on pushes to main branches
6-
pull_request:
7-
branches: [ main, master ] # Also trigger on PRs to main branches
8-
push:
5+
branches: [main, master, develop] # Trigger on pushes to main branches
96
tags:
10-
- 'v*.*.*' # Keep the version tag trigger for releases
7+
- v*.*.* # Also trigger on version tags for releases
8+
pull_request:
9+
branches: [main, master] # Also trigger on PRs to main branches
1110

1211
jobs:
1312
build:
14-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1514

1615
steps:
1716
# Step 1: Checkout the repository
18-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1918
name: Checkout the repository
2019

2120
# Step 2: Build the Docker image
@@ -44,25 +43,25 @@ jobs:
4443

4544
# Step 8: Upload documentation as an artifact (if files exist)
4645
- name: Upload documentation
47-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4847
with:
4948
name: cpp_documentation
5049
path: /cpp_tutorials/docs
5150

5251
# Step 9: Upload build artifacts as an artifact (if files exist)
5352
- name: Upload build artifacts
54-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
5554
with:
5655
name: cpp_build_output
5756
path: /cpp_tutorials/build
5857

5958
release:
6059
needs: build
61-
runs-on: ubuntu-22.04
60+
runs-on: ubuntu-24.04
6261

6362
steps:
6463
# Step 1: Checkout the repository
65-
- uses: actions/checkout@v3
64+
- uses: actions/checkout@v4
6665
name: Checkout the repository
6766

6867
# Step 2: Create a GitHub release using the version tag (e.g., v1.0.0, v1.0.1)
@@ -72,8 +71,8 @@ jobs:
7271
env:
7372
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7473
with:
75-
tag_name: ${{ github.ref }} # Use the pushed version tag as the release tag (e.g., v1.0.0)
76-
release_name: Release ${{ github.ref_name }} # Name the release after the tag (e.g., v1.0.0)
74+
tag_name: ${{ github.ref }} # Use the pushed version tag as the release tag (e.g., v1.0.0)
75+
release_name: Release ${{ github.ref_name }} # Name the release after the tag (e.g., v1.0.0)
7776
body: |
7877
Release notes for version ${{ github.ref_name }}.
7978
draft: false
@@ -85,7 +84,7 @@ jobs:
8584
with:
8685
upload_url: ${{ steps.create_release.outputs.upload_url }}
8786
asset_path: /cpp_tutorials/build/Release/main # Adjust to your actual file
88-
asset_name: main # Adjust this to name the artifact file
87+
asset_name: main # Adjust this to name the artifact file
8988
asset_content_type: application/octet-stream
9089

9190
# Step 4: Upload documentation to release
@@ -96,4 +95,3 @@ jobs:
9695
asset_path: /cpp_tutorials/docs
9796
asset_name: cpp_documentation
9897
asset_content_type: application/zip
99-

0 commit comments

Comments
 (0)