-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: greg pereira <[email protected]>
- Loading branch information
1 parent
bccb6a8
commit bb44d08
Showing
1 changed file
with
36 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,55 +49,50 @@ jobs: | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- uses: actions/[email protected] | ||
|
||
- name: Make Instructlab | ||
run: make instructlab | ||
working-directory: ./training/instructlab | ||
|
||
- name: Checkout buildah codebase | ||
id: checkout-buildah | ||
uses: actions/[email protected] | ||
with: | ||
repository: containers/buildah | ||
path: buildah | ||
ref: 'main' | ||
- uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Setup Buildah v1.36 | ||
working-directory: buildah | ||
- name: Login to Container Registry | ||
if: github.ref == 'refs/heads/main' | ||
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 | ||
docker login ${{ env.REGISTRY }} -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} | ||
- name: Build Image | ||
id: build_image | ||
- name: Extract metadata (tags, labels) for ilab 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 | ||
run: | | ||
buildah --version | ||
buildah bud --platform linux/amd64 \ | ||
-f ${{ matrix.containerfile_path }} \ | ||
--format docker \ | ||
--tls-verify=true \ | ||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target}}:latest \ | ||
instructlab/ | ||
|
||
- name: Login to Container Registry | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: redhat-actions/[email protected] | ||
- name: Build and push ilab images | ||
uses: docker/build-push-action@v5 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.REGISTRY_USER }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
context: ./training/instructlab/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: ./training/instructlab/${{ matrix.containerfile_path }} | ||
|
||
- 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: Build Image | ||
# id: build_image | ||
# working-directory: ./training/instructlab | ||
# run: | | ||
# buildah --version | ||
# buildah bud --platform linux/amd64 \ | ||
# -f ${{ matrix.containerfile_path }} \ | ||
# --format docker \ | ||
# --tls-verify=true \ | ||
# -t ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target}}:latest \ | ||
# instructlab/ | ||
|
||
- name: Publish Job Results to Slack | ||
id: slack | ||
|