feat: don't publish docker containers for interop-tests (#3437)

As per outcome of discussion here: https://github.com/libp2p/test-plans/pull/121#discussion_r1099109241
This commit is contained in:
Thomas Eizinger
2023-02-09 08:27:39 +13:00
committed by GitHub
parent 0bffad98c0
commit 351a166b39

View File

@ -1,51 +0,0 @@
name: Publish interop test docker images
on:
release:
types: [ created ] # Publishing of a containers is triggered on _releases_. Releases are a GH concept building on top of tags.
workflow_dispatch: # This workflow can also be triggered manually which is useful for testing, updates to test binaries or publishing of test binaries for older libp2p versions.
inputs:
dockerTag:
description: 'Docker image tag'
required: true
env:
REGISTRY: ghcr.io
PING_TEST_IMAGE_NAME: ${{ github.repository }}/ping-interop-test
jobs:
publish-interop-test-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with:
shared-key: interop-tests
save-if: false
- name: Log in to the Container registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build test binaries
run: |
sudo apt-get install protobuf-compiler
cargo build --release -p interop-tests
- name: Build and push ping interop docker image
run: |
TAG="${{ env.REGISTRY }}/${{ env.PING_TEST_IMAGE_NAME }}:${{ inputs.dockerTag || github.event.release.tag_name }}"
docker build -t $TAG --build-arg=TEST_BINARY=target/release/ping . -f interop-tests/Dockerfile
docker push $TAG