Skip to content

add exit injection via env for Go app #6

add exit injection via env for Go app

add exit injection via env for Go app #6

Workflow file for this run

name: build-push-go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-push-go:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
ARCH: "amd64"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-go
DOCKER_IMAGE_TAG: ${{ github.sha }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up pack
uses: buildpacks/github-actions/setup-pack@v5.0.0
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build
run: |
pack build ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }} \
--path ./go \
--builder paketobuildpacks/builder-jammy-buildpackless-static \
--buildpack paketo-buildpacks/go \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
--publish