Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: Build images for ghcr.io registry. #188

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.dockerignore
*.mp4
*.ts
/segmented
/hls
/hls2
docker/
/docker/*
Makefile
*Dockerfile*
22 changes: 17 additions & 5 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
build:
name: Build and publish docker images
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: true
fail-fast: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx 😀

matrix:
arrays: [
{"name": "loadtester", "file": "Dockerfile.load-tester"},
Expand All @@ -36,21 +39,30 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: livepeer/${{ matrix.arrays.name }}
images: |
livepeer/${{ matrix.arrays.name }}
ghcr.io/${{ github.repository }}/${{ matrix.arrays.name }}
tags: |
type=schedule,pattern={{date 'YYYYMMDDHHmmss'}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
type=sha,format=long
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=${{github.event.pull_request.head.ref}}
type=semver,pattern={{version}},prefix=v
type=semver,pattern={{major}}.{{minor}},prefix=v
type=raw,value=${{ github.event.pull_request.head.ref }}

- name: Build and push
uses: docker/build-push-action@v3
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- name: Restore go modules cache
id: cache-go-mod
uses: actions/cache@v3
with:
path: |
Expand All @@ -40,5 +41,12 @@ jobs:

- name: Trigger test suite
run: |
# Skip orch-tester, because we not released as a binary
go test $(go list ./... | grep -v 'orch-tester') -v
# ignoring orch-tester
go test $(go list ./... | grep -v "orch-tester") --short -v --covermode=atomic --coverprofile=coverage.out

- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
name: ${{ github.event.repository.name }}
verbose: true
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ api-transcoder:

.PHONY: docker
docker:
docker build -t livepeer/streamtester:latest --build-arg version=$(shell git describe --dirty) .
docker build -f docker/Dockerfile -t livepeer/streamtester:latest --build-arg version=$(shell git describe --dirty) .

.PHONY: push
push:
docker push livepeer/streamtester:latest

.PHONY: localdocker
localdocker:
docker build -f Dockerfile.debian -t livepeer/streamtester:latest --build-arg version=$(shell git describe --dirty) .
docker build -f docker/Dockerfile.debian -t livepeer/streamtester:latest --build-arg version=$(shell git describe --dirty) .

.PHONY: release
release:
Expand Down
Loading