Skip to content

Cache to Artifact

Cache to Artifact #3

Workflow file for this run

name: Cache to Artifact
on:
workflow_dispatch:
inputs:
cacheKey:
description: 'Cache Key Hash'
required: true
jobs:
cache-to-artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Restore cache
uses: actions/cache@v2
with:
path: image.tar
key: ghcr.io/kreneskyp/ix/nodejs:${{ github.event.inputs.cacheKey }}
- name: Archive cache
run: |
tar -czf cache.${{ github.event.inputs.cacheKey }}.tar.gz image.tar
- name: Upload cache as artifact
uses: actions/upload-artifact@v2
with:
name: cache-artifact
path: cache.${{ github.event.inputs.cacheKey }}.tar.gz