Skip to content

Merge pull request #13 from ninech/remove-nginx-conf #13

Merge pull request #13 from ninech/remove-nginx-conf

Merge pull request #13 from ninech/remove-nginx-conf #13

Workflow file for this run

name: build-push-go
on:
push:
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:base \
--buildpack paketo-buildpacks/go \
--env "CGO_ENABLED=0" \
--env "BP_GO_BUILD_FLAGS=-buildmode=default" \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
--publish