Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Riobo Lorenzo <[email protected]>
  • Loading branch information
adrianriobo committed Aug 1, 2024
1 parent 3ee500b commit 06bb460
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 48 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/build-and-push-image.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/oci-pusher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,52 @@ jobs:
preset: ${{matrix.preset}}
secrets: inherit


name: build-and-push-image

# on:

# push:
# branches:
# - main

# pull_request:
# branches:
# - main

# env:
# REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}

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

# steps:
# - name: Checkout repository
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# - name: Login to GitHub Container Registry
# uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# - name: Build and push Docker image (post merge)
# uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
# with:
# context: .
# file: ./oci/Containerfile
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
# labels: ${{ steps.meta.outputs.labels }}
35 changes: 35 additions & 0 deletions .github/workflows/snc-runner-oci-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: snc-runner-oci-builder

on:
push:
branches: [ main ]
tags: [ '*' ]
paths: [ 'snc-runner/**', '.github/workflows/snc-runner*' ]
pull_request:
branches: [ main ]
paths: [ 'snc-runner/**', '.github/workflows/snc-runner*' ]
jobs:
build-pr:
if: ${{ github.event_name == 'pull_request' }}
name: build-pr
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build image for PR
shell: bash
env:
SNC_RUNNER: ghcr.io/crc-org/ci-definitions
SNC_RUNNER_V: pr-${{ github.event.number }}
run: |
make build-snc-runner-oci
podman save -o snc-runner.tar ${SNC_RUNNER}:${SNC_RUNNER_V}
- name: Upload image for PR
uses: actions/upload-artifact@v4
with:
name: snc-runner
path: snc-runner.tar


0 comments on commit 06bb460

Please sign in to comment.