Skip to content

WIP: E2e sink

WIP: E2e sink #33

Workflow file for this run

name: E2E Tests Sink
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: 'kyma-project/e2e-tests-sink'
on:
push:
branches:
- main
tags: [ '*.*.*' ]
paths:
- 'e2e/sink/**/*'
- .github/workflows/sink.yml
pull_request:
branches:
- main
paths:
- 'e2e/sink/**/*'
- .github/workflows/sink.yml
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
defaults:
run:
working-directory: e2e/sink
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
cache: true
- name: Build
run: go build -v ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=semver,pattern={{version}},event=tag
- name: Build Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: e2e/sink
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
load: ${{ github.event_name == 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max