-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Update devcontainer image name construction in build-devcon…
…tainer.yml
- Loading branch information
Showing
2 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "devcontainer image name" | ||
description: | | ||
set up environment variable IMAGE_NAME containing the computed dev container image. | ||
the dev container image name is constructed from the repository owner/name and the branch name all lowercased. | ||
example : ghcr.io/IONOS-Wordpress/ionos-wordpress-develop-devcontainer for develop branch | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: build image name | ||
run: | | ||
# construct IMAGE_NAME from repo owner/name and branch | ||
# example value : "ghcr.io/IONOS-Wordpress/ionos-wordpress-develop-devcontainer" | ||
IMAGE_NAME="ghcr.io/${GITHUB_REPOSITORY}-${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}-devcontainer" | ||
# convert imagename to lowercase and store as environment variable | ||
echo "IMAGE_NAME=${IMAGE_NAME@L}" >> "${GITHUB_ENV}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters