-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from devcontainers/samruddhikhandale/remove-np…
…m-pack Remove pack cmd
- Loading branch information
Showing
3 changed files
with
3 additions
and
103 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 |
---|---|---|
|
@@ -62,49 +62,10 @@ jobs: | |
--stub-registry ${{ secrets.STUB_REGISTRY }} \ | ||
--stub-registry-path ${{ secrets.STUB_REGISTRY_BASE_PATH }} | ||
package: | ||
name: Package | ||
if: "!contains(github.event.head_commit.message, 'Automated update') && !contains(github.event.head_commit.message, 'CI ignore')" | ||
needs: [build-and-push] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Package | ||
id: package | ||
run: | | ||
set -e | ||
yarn install | ||
GIT_BRANCH=$(echo "${{ github.ref }}" | grep -oP 'refs/(heads|tags)/\K(.+)') | ||
if [ "$GIT_BRANCH" == "" ]; then | ||
GIT_BRANCH=main | ||
fi | ||
build/vscdc pack --prep-and-package-only \ | ||
--release $GIT_BRANCH \ | ||
--github-repo ${{ github.repository }} \ | ||
--registry ${{ secrets.REGISTRY }} \ | ||
--registry-path ${{ secrets.REGISTRY_BASE_PATH }} \ | ||
--stub-registry ${{ secrets.STUB_REGISTRY }} \ | ||
--stub-registry-path ${{ secrets.STUB_REGISTRY_BASE_PATH }} | ||
# Set an output with the resulting package name for upload | ||
PKG_PREFIX=$(node -p "require('./package.json').name") | ||
PKG_NAME=$PKG_PREFIX-${{ github.sha }}.tgz | ||
mv ./$PKG_PREFIX-*.tgz ./$PKG_NAME | ||
echo "::set-output name=package_name::$PKG_NAME" | ||
- name: Upload package | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ steps.package.outputs.package_name }} | ||
path: ./${{ steps.package.outputs.package_name }} | ||
|
||
image-info: | ||
name: Trigger info extraction | ||
if: "!contains(github.event.head_commit.message, 'Automated update') && !contains(github.event.head_commit.message, 'CI ignore')" | ||
needs: [package] | ||
needs: [build-and-push] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger image info file generation | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release Containers | ||
name: Build and push images | ||
|
||
on: | ||
push: | ||
|
@@ -61,61 +61,9 @@ jobs: | |
--stub-registry ${{ secrets.STUB_REGISTRY }} \ | ||
--stub-registry-path ${{ secrets.STUB_REGISTRY_BASE_PATH }} | ||
package: | ||
name: Package and release | ||
needs: [build-and-push] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get tag name | ||
id: get_tag_name | ||
run: echo "::set-output name=tag::$(echo "${{ github.ref }}" | grep -oP 'refs/tags/\K(.+)')" | ||
|
||
- name: Package | ||
id: package | ||
run: | | ||
set -e | ||
yarn install | ||
build/vscdc pack --prep-and-package-only \ | ||
--release ${{ steps.get_tag_name.outputs.tag }} \ | ||
--github-repo ${{ github.repository }} \ | ||
--registry ${{ secrets.REGISTRY }} \ | ||
--registry-path ${{ secrets.REGISTRY_BASE_PATH }} \ | ||
--stub-registry ${{ secrets.STUB_REGISTRY }} \ | ||
--stub-registry-path ${{ secrets.STUB_REGISTRY_BASE_PATH }} | ||
# Set an output with the resulting package name for upload | ||
PKG_PREFIX=$(node -p "require('./package.json').name") | ||
echo "::set-output name=package_name::$(ls $PKG_PREFIX-*.tgz)" | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get_tag_name.outputs.tag }} | ||
release_name: ${{ steps.get_tag_name.outputs.tag }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload package as release asset | ||
id: upload_release_asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./${{ steps.package.outputs.package_name }} | ||
asset_name: ${{ steps.package.outputs.package_name }} | ||
asset_content_type: application/gzip | ||
|
||
image-info: | ||
name: Trigger info extraction | ||
needs: [package] | ||
needs: [build-and-push] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get tag name | ||
|
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