Merge pull request #20 from telekom/fix/gh-actions #4
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
name: container-image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
main-image: | |
name: build "main" image | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "^1.18" | |
- name: Install packages | |
run: sudo apt-get update && apt-get install -y llvm clang libbpf-dev libbpf-dev linux-headers-generic-hwe-20.04 | |
- name: Build | |
run: | | |
make build | |
- name: Create Licenses Report | |
run: | | |
make licenses-report | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2.0.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4.0.0 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/telekom/das-schiff-network-operator:main |