Skip to content

Commit 4c37f5c

Browse files
feat(ci): build version-tagged container
1 parent ae6f0e5 commit 4c37f5c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release-deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [ 'releases/v*' ]
66
types: [ closed ]
77

8+
env:
9+
HAB_LICENSE: accept-no-persist
10+
811
jobs:
912
release-deploy:
1013

@@ -32,6 +35,43 @@ jobs:
3235
echo "${PR_BODY}" >> $GITHUB_ENV
3336
echo 'END_OF_PR_BODY' >> $GITHUB_ENV
3437
38+
DOCKER_REPOSITORY="${GITHUB_REPOSITORY,,}"
39+
echo "Using DOCKER_REPOSITORY=${DOCKER_REPOSITORY}"
40+
echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV
41+
42+
- name: 'Initialize Chef Habitat environment'
43+
uses: JarvusInnovations/habitat-action@action/v1
44+
with:
45+
deps: |
46+
jarvus/hologit
47+
48+
- uses: actions/checkout@v2
49+
50+
- id: site-projection
51+
name: 'Project holobranch: emergence-site'
52+
uses: JarvusInnovations/hologit@actions/projector/v1
53+
with:
54+
# use HEAD checked out above by checkout action
55+
ref: HEAD
56+
fetch: false
57+
holobranch: emergence-site
58+
59+
- name: Build & push Docker image
60+
uses: whoan/docker-build-with-cache-action@v5
61+
with:
62+
dockerfile: Dockerfile
63+
username: ${{ github.actor }}
64+
password: ${{ env.GITHUB_TOKEN }}
65+
registry: ghcr.io
66+
image_name: ${{ env.DOCKER_REPOSITORY }}/${{ env.DOCKER_PACKAGE }}
67+
image_tag: ${{ env.RELEASE_NAME }}
68+
build_extra_args: |
69+
--build-arg=SITE_TREE=${{ steps.site-projection.outputs.tree }}
70+
--build-arg=SITE_VERSION=${{ env.RELEASE_TAG }}
71+
--build-arg=SOURCE_COMMIT=${{ github.sha }}
72+
--build-arg=SOURCE_TAG=${{ env.RELEASE_TAG }}
73+
--build-arg=HAB_LICENSE=${{ env.HAB_LICENSE }}
74+
3575
- name: Create release
3676
uses: ncipollo/release-action@v1
3777
with:

0 commit comments

Comments
 (0)