Skip to content

Commit

Permalink
refactor to match upstream ilab
Browse files Browse the repository at this point in the history
Signed-off-by: greg pereira <[email protected]>
  • Loading branch information
Gregory-Pereira committed May 29, 2024
1 parent bccb6a8 commit 131034b
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions .github/workflows/instructlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,39 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/[email protected]

- uses: docker/setup-buildx-action@v3

- name: Login to Container Registry
if: github.ref == 'refs/heads/main'
run: |
docker login ${{ env.REGISTRY }} -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }}
- name: Extract metadata (tags, labels) for gotbot image
id: ilab_meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target }}
- name: Make Instructlab
run: make instructlab
working-directory: ./training/instructlab

- name: Checkout buildah codebase
id: checkout-buildah
uses: actions/[email protected]
- name: Build and push ilab images
uses: docker/build-push-action@v5
working-directory: ./training/instructlab
with:
repository: containers/buildah
path: buildah
ref: 'main'

- name: Setup Buildah v1.36
working-directory: buildah
run: |
sudo apt-get -y -qq update
sudo apt-get -y install bats btrfs-progs git go-md2man golang libapparmor-dev libglib2.0-dev libgpgme11-dev libseccomp-dev libselinux1-dev make skopeo
make runc all SECURITYTAGS="apparmor seccomp"
sudo make install install.runc
context: instructlab
platforms: linux/amd64
build-args: |
GIT_TAG=stable
push: false
tags: ${{ steps.ilab_meta.outputs.tags }}
labels: ${{ steps.ilab_meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
file: ${{ matrix.containerfile_path }}

- name: Build Image
id: build_image
Expand All @@ -83,21 +96,6 @@ jobs:
instructlab/
- name: Login to Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}
- name: Publish Job Results to Slack
id: slack
Expand Down

0 comments on commit 131034b

Please sign in to comment.