Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
Add GH actions for pull request workflow (#14)
Browse files Browse the repository at this point in the history
* Fix Dockerfiles
* Add pull_request_workflow GH action
* Fix indentation in bash scripts
  • Loading branch information
leo8a committed Oct 23, 2023
1 parent 7663702 commit 506fe70
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 78 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/bashate_and_shellcheck.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/pull_request_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Pull Request Workflow

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]


jobs:

lint_bash:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: make build # Build Imager tool
- run: make shellcheck # Run ShellCheck
- run: make bashate # Run Bashate

lint_golang:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "stable"
- uses: golangci/golangci-lint-action@v3
with:
version: "latest"
# - run: make generate
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /workspace
COPY go.mod go.sum ./
COPY vendor/ vendor/

# Copy the go source
# Copy the Go source installation_configuration_files
COPY main.go main.go
COPY cmd/ cmd/
COPY internal/ internal/
Expand All @@ -24,12 +24,16 @@ RUN curl -sL https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRI


########### Runtime ##########
FROM registry.ci.openshift.org/ocp/4.13:tools
FROM registry.access.redhat.com/ubi9/ubi:latest

WORKDIR /

COPY --from=builder /workspace/ibu-imager .
COPY --from=builder /workspace/crictl /usr/bin/
COPY installation_configuration_files/ installation_configuration_files/

RUN yum -y install jq && \
yum clean all && \
rm -rf /var/cache/yum

ENTRYPOINT ["./ibu-imager"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IBU Imager

[![Lint Bash Scripts](https://github.com/leo8a/ibu-imager/actions/workflows/bashate_and_shellcheck.yaml/badge.svg)](https://github.com/leo8a/ibu-imager/actions/workflows/bashate_and_shellcheck.yaml)
[![CI](https://github.com/leo8a/ibu-imager/actions/workflows/pull_request_workflow.yml/badge.svg)](https://github.com/leo8a/ibu-imager/actions/workflows/pull_request_workflow.yml

This application will assist users to easily create an OCI seed image for the Image-Based Upgrade (IBU) workflow, using
a simple CLI.
Expand Down
40 changes: 0 additions & 40 deletions dev.Dockerfile

This file was deleted.

10 changes: 4 additions & 6 deletions hack/clean.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash

sudo rm -rf /var/tmp/container_list.done \
/var/tmp/backup && \
/var/tmp/backup && \
sudo rm -f /usr/local/bin/prepare-installation-configuration.sh \
/usr/local/bin/installation-configuration.sh && \
/usr/local/bin/installation-configuration.sh && \
sudo systemctl disable installation-configuration.service && \
sudo systemctl disable prepare-installation-configuration.service && \
rm -f /etc/systemd/system/installation-configuration.service \
/etc/systemd/system/prepare-installation-configuration.service && \
/etc/systemd/system/prepare-installation-configuration.service && \
sudo podman rmi quay.io/alosadag/ibu-seed-sno0:oneimage --force && \
sudo systemctl enable --now kubelet && \
sudo systemctl enable --now crio


sudo systemctl enable --now crio

0 comments on commit 506fe70

Please sign in to comment.