Skip to content

Commit

Permalink
test for cache build on gh
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Riobo Lorenzo <[email protected]>
  • Loading branch information
adrianriobo committed May 13, 2024
1 parent fc4a76b commit cbc6c99
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/build-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build-cache

on:
push:
branches:
- main

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 #v2.17
with:
image: ghcr.io/${{ github.repository }}-cache
tags: latest ${{ github.sha }}
containerfiles: |
./oci/Containerfile.cache
- name: Push To Registry
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c #v2.8
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion oci/Containerfile.multistage
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# SPDX-License-Identifier: Apache-2.0

FROM quay.io/rhqp/openshift-local-extension-cache:latest AS builder
FROM ghcr.io/crc-org/crc-extension-cache:latest AS builder

COPY . .

Expand Down

0 comments on commit cbc6c99

Please sign in to comment.