Skip to content

Commit

Permalink
ci: fix cache that was not aware of changes in ci scripts, add tag/co…
Browse files Browse the repository at this point in the history
…mmit to artifact name, add dir in tag
  • Loading branch information
Giuncan committed Oct 23, 2024
1 parent fc2f091 commit 9f58eb6
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,27 @@ jobs:
id: cache-pyenv
with:
path: .pyenv
key: pyenv-${{ env.PYENV_VERSION }}-python-${{ env.PYTHON_VERSION }}-${{ matrix.os }}
key: pyenv-${{ env.PYENV_VERSION }}-python-${{ env.PYTHON_VERSION }}-${{ matrix.os }}-${{ hashFiles('scripts/ci/02-install-python.*') }}

- name: (GHO) Cache venv
uses: actions/[email protected]
id: cache-venv
with:
path: .venv
key: venv-python-${{ env.PYTHON_VERSION }}-${{ hashFiles( format('{0}/rcm/client/requirements.txt', env.RCM_CHECKOUT ) ) }}-paramiko-${{ env.PARAMIKO_PULL }}-${{env.PARAMIKO_COMMIT}}-${{ matrix.os }}
key: venv-python-${{ env.PYTHON_VERSION }}-paramiko-${{ env.PARAMIKO_PULL }}-${{env.PARAMIKO_COMMIT}}-${{ matrix.os }}-${{ hashFiles('scripts/ci/03-install-venv.*', '**/requirements.txt') }}

- name: (GHO) Cache turbovnc
uses: actions/[email protected]
id: cache-turbovnc
with:
path: ${{ env.RCM_CHECKOUT }}/${{ env.TURBOVNC_EXTERNAL }}
key: turbovnc-${{ matrix.turbovnc-version }}-${{ matrix.os }}
key: turbovnc-${{ matrix.turbovnc-version }}-${{ matrix.os }}-${{ hashFiles('scripts/ci/04*') }}

- name: (GHO) Cache step
uses: actions/[email protected]
id: cache-step
with:
path: ${{ env.RCM_CHECKOUT }}/${{ env.SMALLSTEP_EXTERNAL }}
path: ${{ env.RCM_CHECKOUT }}/${{ env.SMALLSTEP_EXTERNAL }}-${{ hashFiles('scripts/ci/05*') }}
key: step-${{ matrix.os }}

# PYTHON
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
with:
linux: . "${RCM_CHECKOUT}/scripts/ci/05-extract-step-linux.sh"
windows: . "${env:RCM_CHECKOUT}\scripts\ci\05-extract-step.ps1"

# EXTERNAL PLINK
- name: External plink (windows)
uses: carlkidcrypto/[email protected]
Expand Down Expand Up @@ -217,7 +217,17 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
file: RCM${{ env.EXT }}
asset_name: ${{ env.ARTIFACT_BASENAME }}${{ env.EXT }}
asset_name: ${{ env.ARTIFACT_BASENAME }}-${{ github.ref_name }}${{ env.EXT }}
prerelease: true
overwrite: true
tag: ${{ github.ref }}

- name: (GHO)(TAG) Upload exe to release
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
uses: svenstaro/upload-release-action@v2
with:
file: RCM.zip
asset_name: ${{ env.ARTIFACT_BASENAME }}-${{ github.ref_name }}.zip
prerelease: true
overwrite: true
tag: ${{ github.ref }}
Expand All @@ -226,14 +236,14 @@ jobs:
if: ${{ github.event_name != 'push' && !contains(github.ref, 'refs/tags/') }}
uses: actions/[email protected]
with:
name: ${{ env.ARTIFACT_BASENAME }}
name: ${{ env.ARTIFACT_BASENAME }}-${{ github.sha }}
path: RCM${{ env.EXT }}

- name: (GHO) Upload artifact dir
if: ${{ github.event_name != 'push' && !contains(github.ref, 'refs/tags/') }}
uses: actions/[email protected]
with:
name: ${{ env.ARTIFACT_BASENAME }}-dir
name: ${{ env.ARTIFACT_BASENAME }}-${{ github.sha }}-dir
path: RCM.zip

- name: (Attestation) Verify RCM executable and zip
Expand Down

0 comments on commit 9f58eb6

Please sign in to comment.