Skip to content

fix(deps): update all go dependencies main #124

fix(deps): update all go dependencies main

fix(deps): update all go dependencies main #124

Workflow file for this run

name: Image Release Build
on:
pull_request: {}
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true
jobs:
build-and-push-prs:
if: ${{ github.repository == 'cilium/pwru' }}
environment: ${{ github.ref_type == 'tag' && 'release' }}
runs-on: ubuntu-24.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Login to DockerHub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
if: ${{ github.ref_type == 'tag' }}
with:
username: ${{ secrets.DOCKER_HUB_RELEASE_USERNAME }}
password: ${{ secrets.DOCKER_HUB_RELEASE_PASSWORD }}
- name: Getting image tag
id: tag
run: |
if [ ${{ github.event.pull_request.head.sha }} != "" ]; then
tag=${{ github.event.pull_request.head.sha }}
elif [ "${{ github.ref_type }}" == "tag" ]; then
tag=${{ github.ref_name }}
else
tag=${{ github.sha }}
fi
echo tag=$tag >> $GITHUB_OUTPUT
echo image_tags=${{ github.repository_owner }}/pwru:$tag >> $GITHUB_OUTPUT
- name: Checkout Source Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ steps.tag.outputs.tag }}
- name: Docker Build
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.tag.outputs.image_tags }}