Skip to content

Commit

Permalink
gh: Add workflow to build and push
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Deutsch <[email protected]>
  • Loading branch information
fabiand committed May 16, 2024
1 parent 5342710 commit 2fce076
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-n-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Push Image
on: [ push ]

jobs:
build:
name: Build and push image
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: wasp-agent
tags: latest ${{ github.sha }}
containerfiles: |
./Containerfile
# Podman Login action (https://github.com/redhat-actions/podman-login) also be used to log in,
# in which case 'username' and 'password' can be omitted.
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/openshift-virtualization
username: wasp_agent_gh_workflow
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
2 changes: 1 addition & 1 deletion examples/fedora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
- sleep
- "6000"
image: >-
quay.io/openshift-virtualization/wasp-agent:latest
quay.io/fdeutsch/wasp-operator-prototype:latest
name: fedora
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion examples/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
- -c
- "dd if=/dev/urandom of=/dev/shm/rnd bs=1M count=60 ; sleep inf"
image: >-
quay.io/openshift-virtualization/wasp-agent:latest
quay.io/fdeutsch/wasp-operator-prototype:latest
name: fedora
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion examples/stress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- -c
- "sleep $(( RANDOM % 30 )) ; stress -v -m 1 --vm-bytes 1G --vm-hang 3"
image: >-
quay.io/openshift-virtualization/wasp-agent:latest
quay.io/fdeutsch/wasp-operator-prototype:latest
name: fedora
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion manifests/ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
containers:
- name: wasp-agent
image: >-
quay.io/openshift-virtualization/wasp-agent:latest
quay.io/fdeutsch/wasp-operator-prototype:latest
imagePullPolicy: Always
env:
- name: "FSROOT"
Expand Down
2 changes: 1 addition & 1 deletion to.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMG_REPO=quay.io/openshift-virtualization/wasp-agent
IMG_REPO=quay.io/fdeutsch/wasp-operator-prototype

build() {
podman -r build -t $IMG_REPO -f Containerfile .
Expand Down

0 comments on commit 2fce076

Please sign in to comment.