Skip to content

Make sure controller and tests shut down cleanly #48

Make sure controller and tests shut down cleanly

Make sure controller and tests shut down cleanly #48

Workflow file for this run

name: Release PR image
on:
issue_comment:
types: [created, edited, deleted]
jobs:
pr_release:
name: Release image on PR comment
if: github.event.issue.pull_request && contains(github.event.comment.body, '/make-pr-image')
runs-on: ubuntu-latest
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Setup
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache: true
- name: Setup QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Prepare # .netrc is used by docker-build, ~/.netrc is used by go test
run: echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" | tee ~/.netrc .netrc
- name: Push to GitHub Container Registry
run: IMG_TAG=pr-${{github.event.issue.number}}-${{ steps.comment-branch.outputs.head_ref }} make docker-push # defaults to ghcr.io