Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Cache stacker builds
Browse files Browse the repository at this point in the history
Signed-off-by: Petu Eusebiu <[email protected]>
  • Loading branch information
eusebiu-constantin-petu-dbk committed Sep 29, 2022
1 parent 72aa5c8 commit 5cd10db
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ jobs:
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Cache stacker builds
id: cache-stacker-builds
uses: actions/cache@v3
with:
path: |
.stacker/
roots/
oci/
key: ${{ runner.os }}-stacker-builds-${{ matrix.image }}${{ hashFiles('images/**/stacker.yaml') }}
restore-keys: |
${{ runner.os }}-stacker-builds-
- name: Setup env vars
run: |
cat config.mk | sed /^#.*$/d | sed s/\?=/=/g | sed s/#.*$//g | egrep -v "COMMIT|MAKE|DISTRO" > $GITHUB_ENV
Expand Down Expand Up @@ -103,6 +114,11 @@ jobs:
./zli config local verify-tls false
./zli config local showspinner false
./zli cve local -I ${{ github.repository_owner }}/c3/${{ env.IMAGE }}:${{ env.IMAGE_TAG }}
- name: Post Build - modify permission rights on stacker cache dirs
run: |
sudo chmod -R a+r .stacker/
sudo chmod -R a+r roots/
sudo chmod -R a+r oci/
release:
name: Release
if: github.event_name == 'release' && github.event.action == 'published'
Expand Down Expand Up @@ -131,6 +147,17 @@ jobs:
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Cache stacker builds
id: cache-stacker-builds
uses: actions/cache@v3
with:
path: |
.stacker/
roots/
oci/
key: ${{ runner.os }}-stacker-builds-${{ matrix.image }}${{ hashFiles('images/**/stacker.yaml') }}
restore-keys: |
${{ runner.os }}-stacker-builds-
- name: Setup env vars
run: |
cat config.mk | sed /^#.*$/d | sed s/\?=/=/g | sed s/#.*$//g | egrep -v "COMMIT|MAKE|DISTRO" > $GITHUB_ENV
Expand Down Expand Up @@ -214,3 +241,9 @@ jobs:
TAGS: ${{ env.IMAGE_TAG }}
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
# needed for actions/cache
- name: Post Build - modify permission rights on stacker cache dirs
run: |
sudo chmod -R a+r .stacker/
sudo chmod -R a+r roots/
sudo chmod -R a+r oci/

0 comments on commit 5cd10db

Please sign in to comment.