|
5 | 5 | branches: [ 'releases/v*' ] |
6 | 6 | types: [ closed ] |
7 | 7 |
|
| 8 | +env: |
| 9 | + DOCKER_REGISTRY: ghcr.io |
| 10 | + DOCKER_PACKAGE: site-composite |
| 11 | + |
| 12 | + HAB_LICENSE: accept-no-persist |
| 13 | + |
8 | 14 | jobs: |
9 | 15 | release-deploy: |
10 | 16 |
|
|
32 | 38 | echo "${PR_BODY}" >> $GITHUB_ENV |
33 | 39 | echo 'END_OF_PR_BODY' >> $GITHUB_ENV |
34 | 40 |
|
| 41 | + DOCKER_REPOSITORY="${GITHUB_REPOSITORY,,}" |
| 42 | + echo "Using DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" |
| 43 | + echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV |
| 44 | +
|
| 45 | + DOCKER_TAG="${RELEASE_TAG:1}" |
| 46 | + echo "Using DOCKER_TAG=${DOCKER_TAG}" |
| 47 | + echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV |
| 48 | +
|
| 49 | + - name: 'Initialize Chef Habitat environment' |
| 50 | + uses: JarvusInnovations/habitat-action@action/v1 |
| 51 | + with: |
| 52 | + deps: | |
| 53 | + jarvus/hologit |
| 54 | +
|
| 55 | + - uses: actions/checkout@v2 |
| 56 | + |
| 57 | + - id: site-projection |
| 58 | + name: 'Project holobranch: emergence-site' |
| 59 | + uses: JarvusInnovations/hologit@actions/projector/v1 |
| 60 | + with: |
| 61 | + # use HEAD checked out above by checkout action |
| 62 | + ref: HEAD |
| 63 | + fetch: false |
| 64 | + holobranch: emergence-site |
| 65 | + |
| 66 | + - name: Build & push Docker image |
| 67 | + uses: whoan/docker-build-with-cache-action@v5 |
| 68 | + with: |
| 69 | + dockerfile: Dockerfile |
| 70 | + username: ${{ github.actor }} |
| 71 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 72 | + registry: ${{ env.DOCKER_REGISTRY }} |
| 73 | + image_name: ${{ env.DOCKER_REPOSITORY }}/${{ env.DOCKER_PACKAGE }} |
| 74 | + image_tag: ${{ env.DOCKER_TAG }} |
| 75 | + build_extra_args: | |
| 76 | + --build-arg=SITE_TREE=${{ steps.site-projection.outputs.tree }} |
| 77 | + --build-arg=SITE_VERSION=${{ env.RELEASE_TAG }} |
| 78 | + --build-arg=SOURCE_COMMIT=${{ github.sha }} |
| 79 | + --build-arg=SOURCE_TAG=${{ env.RELEASE_TAG }} |
| 80 | + --build-arg=HAB_LICENSE=${{ env.HAB_LICENSE }} |
| 81 | +
|
35 | 82 | - name: Create release |
36 | 83 | uses: ncipollo/release-action@v1 |
37 | 84 | with: |
|
0 commit comments