From 7c11f3b4fb98108cc555389d0ab8de59ad34b503 Mon Sep 17 00:00:00 2001 From: divyansh42 Date: Mon, 13 Sep 2021 17:32:16 +0530 Subject: [PATCH] Add script in a file to install latest buildah Signed-off-by: divyansh42 --- .github/install_latest_buildah.sh | 7 +++++++ .github/workflows/dockerfile_build.yml | 15 +++++---------- .github/workflows/multiarch.yml | 15 +++++---------- .github/workflows/scratch_build.yml | 15 +++++---------- 4 files changed, 22 insertions(+), 30 deletions(-) create mode 100644 .github/install_latest_buildah.sh diff --git a/.github/install_latest_buildah.sh b/.github/install_latest_buildah.sh new file mode 100644 index 0000000..83b2ecf --- /dev/null +++ b/.github/install_latest_buildah.sh @@ -0,0 +1,7 @@ +# https://github.com/containers/buildah/blob/main/install.md +. /etc/os-release +sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" +wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${ID^}_${VERSION_ID}/Release.key -O Release.key +sudo apt-key add - < Release.key +sudo apt-get update -qq +sudo apt-get -qq -y install buildah diff --git a/.github/workflows/dockerfile_build.yml b/.github/workflows/dockerfile_build.yml index de61fbe..1cdbfbe 100644 --- a/.github/workflows/dockerfile_build.yml +++ b/.github/workflows/dockerfile_build.yml @@ -22,16 +22,6 @@ jobs: install_latest: [ true, false ] steps: - - name: Install latest buildah - if: matrix.install_latest - # https://github.com/containers/buildah/blob/main/install.md - run: | - . /etc/os-release - sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" - wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${ID^}_${VERSION_ID}/Release.key -O Release.key - sudo apt-key add - < Release.key - sudo apt-get update -qq - sudo apt-get -qq -y install buildah # Checkout buildah action github repository - name: Checkout Buildah action @@ -39,6 +29,11 @@ jobs: with: path: "buildah-build" + - name: Install latest buildah + if: matrix.install_latest + run: | + bash buildah-build/.github/install_latest_buildah.sh + - name: Create Dockerfile run: | cat > Dockerfile< /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" - wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${ID^}_${VERSION_ID}/Release.key -O Release.key - sudo apt-key add - < Release.key - sudo apt-get update -qq - sudo apt-get -qq -y install buildah # Checkout buildah action github repository - name: Checkout Buildah action @@ -38,6 +28,11 @@ jobs: with: path: "buildah-build" + - name: Install latest buildah + if: matrix.install_latest + run: | + bash buildah-build/.github/install_latest_buildah.sh + - name: Install qemu dependency run: | sudo apt-get update diff --git a/.github/workflows/scratch_build.yml b/.github/workflows/scratch_build.yml index e4f6f19..e6caecc 100644 --- a/.github/workflows/scratch_build.yml +++ b/.github/workflows/scratch_build.yml @@ -24,16 +24,6 @@ jobs: install_latest: [ true, false ] steps: - - name: Install latest buildah - if: matrix.install_latest - # https://github.com/containers/buildah/blob/main/install.md - run: | - . /etc/os-release - sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${ID^}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" - wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${ID^}_${VERSION_ID}/Release.key -O Release.key - sudo apt-key add - < Release.key - sudo apt-get update -qq - sudo apt-get -qq -y install buildah # Checkout buildah action github repository - name: Checkout Buildah action @@ -41,6 +31,11 @@ jobs: with: path: "buildah-build" + - name: Install latest buildah + if: matrix.install_latest + run: | + bash buildah-build/.github/install_latest_buildah.sh + # Checkout spring-petclinic github repository - name: Checkout spring-petclinic project uses: actions/checkout@v2