-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate workflow "systemtest-base-el8" to Github Actions
This commit adds a new GitHub Actions workflow to build the Vespa systemtest base Docker image for CentOS 8. The workflow is triggered on pushes to the main branch and pull requests targeting the main branch, and it builds and pushes the Docker image to Docker Hub. image. feat(ci): Schedule container image build in weekly cron
- Loading branch information
1 parent
356fe9d
commit 1aecf59
Showing
1 changed file
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build Container Images | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/build-container-images.yml" | ||
- "docker/**" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/build-container-images.yml" | ||
- "docker/**" | ||
|
||
schedule: | ||
- cron: "0 4 * * 1" | ||
|
||
jobs: | ||
systemtest-base-el8: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: docker.io/vespaengine/vespa-systemtest-base-el8:latest | ||
tags: | | ||
# tag container image with branch name and pr number | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
# set "latest" tag for default branch | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v | ||
with: | ||
context: docker/ | ||
file: Dockerfile.base | ||
build-args: | | ||
BASE_IMAGE=docker.io/almalinux:8 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |