Skip to content

Commit

Permalink
fix: add permissionto workflow and enable run on push to master
Browse files Browse the repository at this point in the history
  • Loading branch information
ritwikranjan committed Oct 1, 2024
1 parent 6cd8a3e commit 69c2c53
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docker-publish-nptest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and Push Docker Image for network/benchmarks/netperf/nptest

on:
push:
branches:
- master
release:
types: [published, edited]

Expand Down Expand Up @@ -28,5 +31,8 @@ jobs:
make push
env:
DOCKERREPO: ghcr.io/${{ github.repository_owner }}/nptest
# IMAGE_TAG should be commit id if push else tag if release
IMAGE_TAG: ${{ github.event.release.tag_name }}
# IMAGE_TAG would be commit id if push else tag if release
IMAGE_TAG: ${{ github.event_name == 'push' && github.sha || github.event.release.tag_name }}

permissions:
packages: write # Write permission is required to publish Docker images to GitHub Container Registry

0 comments on commit 69c2c53

Please sign in to comment.