Skip to content

Commit

Permalink
refactor(action): disalbe build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cage1016 committed May 12, 2021
1 parent b692756 commit 2ea1077
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: Build
# name: Build

on:
push:
branches:
- master
paths:
- "cmd/**"
- "internal/**"
- "pb/**"
- "deployments/**"
# on:
# push:
# branches:
# - master
# paths:
# - "cmd/**"
# - "internal/**"
# - "pb/**"
# - "deployments/**"

jobs:
build-oci:
name: build container image
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout code
uses: actions/checkout@v2
- name: Login to GitHub Package Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- id: setup-pack
uses: buildpacks/github-actions/[email protected]
- id: build-container-images
run: |
#!/usr/bin/env bash
set -euo pipefail
# jobs:
# build-oci:
# name: build container image
# runs-on: ubuntu-latest
# steps:
# - id: checkout
# name: Checkout code
# uses: actions/checkout@v2
# - name: Login to GitHub Package Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GHCR_TOKEN }}
# - id: setup-pack
# uses: buildpacks/github-actions/[email protected]
# - id: build-container-images
# run: |
# #!/usr/bin/env bash
# set -euo pipefail

pack build --builder ${BUILDER} --buildpack google.go.runtime \
--buildpack google.go.build \
--buildpack google.utils.label \
--buildpack ${GITHUB_ASSETS_CNB} \
--env GOOGLE_BUILDABLE=cmd/add/main.go --publish ${ADD_IMAGE}
# pack build --builder ${BUILDER} --buildpack google.go.runtime \
# --buildpack google.go.build \
# --buildpack google.utils.label \
# --buildpack ${GITHUB_ASSETS_CNB} \
# --env GOOGLE_BUILDABLE=cmd/add/main.go --publish ${ADD_IMAGE}

pack build --builder ${BUILDER} --buildpack google.go.runtime \
--buildpack google.go.build \
--buildpack google.utils.label \
--buildpack ${GITHUB_ASSETS_CNB} \
--env GOOGLE_BUILDABLE=cmd/tictac/main.go --publish ${TICTAC_IMAGE}
shell: bash
env:
BUILDER: gcr.io/buildpacks/builder:v1
ADD_IMAGE: ghcr.io/${{ github.repository_owner }}/ms-sample-add
TICTAC_IMAGE: ghcr.io/${{ github.repository_owner }}/ms-sample-tictac
GITHUB_ASSETS_CNB: cage1016/[email protected]
# pack build --builder ${BUILDER} --buildpack google.go.runtime \
# --buildpack google.go.build \
# --buildpack google.utils.label \
# --buildpack ${GITHUB_ASSETS_CNB} \
# --env GOOGLE_BUILDABLE=cmd/tictac/main.go --publish ${TICTAC_IMAGE}
# shell: bash
# env:
# BUILDER: gcr.io/buildpacks/builder:v1
# ADD_IMAGE: ghcr.io/${{ github.repository_owner }}/ms-sample-add
# TICTAC_IMAGE: ghcr.io/${{ github.repository_owner }}/ms-sample-tictac
# GITHUB_ASSETS_CNB: cage1016/[email protected]

0 comments on commit 2ea1077

Please sign in to comment.