forked from daaku/gh-action-apt-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
37 lines (34 loc) · 910 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Cache apt install
description: Cache apt install.
author: daaku
branding:
icon: zap
color: orange
inputs:
packages:
description: Packages to install.
required: true
version:
description: Additional version to include.
required: false
default: ""
outputs:
cache-hit:
description: Boolean value to indicate a cache hit occurred.
value: ${{ steps.cache.outputs.cache-hit || false }}
runs:
using: composite
steps:
- run: |
echo "INPUTS_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
echo "INPUTS_PACKAGES=${{ inputs.packages }}" >> $GITHUB_ENV
shell: bash
- run: ${{ github.action_path }}/action pre
shell: bash
- id: cache
uses: actions/cache@v4
with:
path: ~/.apt-cache
key: apt-cache-${{ runner.os }}-${{ env.APT_CACHE_KEY }}
- run: ${{ github.action_path }}/action post
shell: bash