Skip to content

Add gh action to publish nptest package on tag push (#2) #1

Add gh action to publish nptest package on tag push (#2)

Add gh action to publish nptest package on tag push (#2) #1

name: Build and Push Docker Image for network/benchmarks/netperf/nptest
on:
push:
tags:
- '**'
jobs:
build-and-push:
permissions:
packages: write # Write permission is required to publish Docker images to GitHub Container Registry
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd network/benchmarks/netperf
make push
env:
DOCKERREPO: ghcr.io/${{ github.repository_owner }}/nptest
IMAGE_TAG: ${{ github.ref_name }}