forked from quic-go/quic-go
use GitHub Actions to build the interop runner Docker image
This commit is contained in:
@@ -5,11 +5,6 @@ executors:
|
|||||||
- image: "circleci/golang:1.14"
|
- image: "circleci/golang:1.14"
|
||||||
environment:
|
environment:
|
||||||
runrace: true
|
runrace: true
|
||||||
interop:
|
|
||||||
docker:
|
|
||||||
- image: circleci/buildpack-deps:stretch
|
|
||||||
environment:
|
|
||||||
IMAGE_NAME: martenseemann/quic-go-interop
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
"test": &test
|
"test": &test
|
||||||
@@ -45,49 +40,8 @@ jobs:
|
|||||||
command: ginkgo -v -randomizeAllSpecs -trace integrationtests/self -- -qlog -metrics
|
command: ginkgo -v -randomizeAllSpecs -trace integrationtests/self -- -qlog -metrics
|
||||||
go114:
|
go114:
|
||||||
<<: *test
|
<<: *test
|
||||||
interop-build:
|
|
||||||
executor: interop
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- setup_remote_docker:
|
|
||||||
docker_layer_caching: true
|
|
||||||
- run:
|
|
||||||
name: Build docker image
|
|
||||||
command: cd interop && docker build . -t $IMAGE_NAME:latest --pull --build-arg CACHEBUST=$(date +%s)
|
|
||||||
- run:
|
|
||||||
name: Archive Docker image
|
|
||||||
command: docker save -o image.tar $IMAGE_NAME
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: .
|
|
||||||
paths:
|
|
||||||
- ./image.tar
|
|
||||||
interop-publish:
|
|
||||||
executor: interop
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /tmp/workspace
|
|
||||||
- setup_remote_docker
|
|
||||||
- run:
|
|
||||||
name: Load archived Docker image
|
|
||||||
command: docker load -i /tmp/workspace/image.tar
|
|
||||||
- run:
|
|
||||||
name: Publish quic-go-interop
|
|
||||||
command: |
|
|
||||||
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
|
|
||||||
docker push $IMAGE_NAME:latest
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
workflow:
|
workflow:
|
||||||
jobs:
|
jobs:
|
||||||
- go114
|
- go114
|
||||||
- interop-build:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only: interop
|
|
||||||
- interop-publish:
|
|
||||||
requires:
|
|
||||||
- go114
|
|
||||||
- interop-build
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only: interop
|
|
||||||
|
|||||||
20
.github/workflows/build-interop-docker.yml
vendored
Normal file
20
.github/workflows/build-interop-docker.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Build interop Docker image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ interop ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
interop:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: docker/build-push-action@v1
|
||||||
|
with:
|
||||||
|
always_pull: true
|
||||||
|
path: interop/
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
repository: martenseemann/quic-go-interop
|
||||||
|
tags: latest
|
||||||
|
tag_with_ref: true
|
||||||
|
add_git_labels: true
|
||||||
Reference in New Issue
Block a user