Skip to content

Commit

Permalink
Merge pull request #25 from devcontainers/samruddhikhandale/remove-np…
Browse files Browse the repository at this point in the history
…m-pack

Remove pack cmd
  • Loading branch information
samruddhikhandale authored Jun 20, 2022
2 parents fecbb76 + f80657b commit 1eb14ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 103 deletions.
41 changes: 1 addition & 40 deletions .github/workflows/push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Containers
name: Build and push images

on:
push:
Expand Down Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"name": "dev-containers",
"version": "0.0.1",
"description": "Dev Containers: Definitions",
"repository": {
"type": "git",
"url": "https://github.com/devcontainers/images.git"
},
"author": "Microsoft Corporation",
"license": "SEE LICENSE IN LICENSE.md",
"files": [
"src"
],
Expand Down

0 comments on commit 1eb14ca

Please sign in to comment.