Skip to content

Add automated tests #1435

Add automated tests

Add automated tests #1435

Workflow file for this run

name: ci
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: 0 0 * * *
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/jenkins-agent-dind
tags: |
type=schedule,pattern=nightly
type=schedule,pattern={{date 'YYYYMMDD'}}
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event_name == 'schedule' }}
type=sha,enable=${{ github.event_name == 'push' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup test dependencies
uses: pkgxdev/setup@v1
with:
+: >
k3d
helmfile
werf
kubectl
- name: Test
run: |
tests/run.sh
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}