From 4412e6e8ca707cd48308811f0ede10022014be8e Mon Sep 17 00:00:00 2001 From: Waqar Butt <114666466+Waqar-ukaea@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:55:30 +0100 Subject: [PATCH] Create vtune-docker.yml --- .github/workflows/vtune-docker.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/vtune-docker.yml diff --git a/.github/workflows/vtune-docker.yml b/.github/workflows/vtune-docker.yml new file mode 100644 index 0000000..c8a0d29 --- /dev/null +++ b/.github/workflows/vtune-docker.yml @@ -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