Skip to content

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

fix(deps): update all go dependencies main

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

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@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to DockerHub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ steps.tag.outputs.tag }}
- name: Docker Build
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.tag.outputs.image_tags }}