Skip to content

Commit

Permalink
Create vtune-docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Waqar-ukaea authored Oct 21, 2024
1 parent 2fcd42a commit 4412e6e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/vtune-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: VTune hotspots analysis (docker)

on:
workflow_dispatch:

jobs:
vtune-analysis:
runs-on: ubuntu-latest
env:
PRCOMMITSHA : ${{ github.event.pull_request.head.sha }}

steps:
# Step 1: Checkout the code from the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Step 2: Build the Docker image
- name: Build Docker Image
run: |
docker build -t your-image-name .
# Step 3: Run Docker container, create an artifact, and upload it to GitHub
- name: Create Artifact and Upload to GitHub Releases
run: |
docker run --rm your-image-name sh -c " \
tar -czf artifact.tar.gz hotspots_summary.html && \
echo $GITHUB_TOKEN | gh auth login --with-token && \
gh release upload v1.0.0 hotspots.tar.gz"
env:
GITHUB_TOKEN: ${{ secrets.ARTIFACT_TOKEN }} # Token must have repo access

0 comments on commit 4412e6e

Please sign in to comment.