aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yaml
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2022-08-05 22:22:30 +0300
committerGitHub <noreply@github.com>2022-08-05 22:22:30 +0300
commit542963cf04cbe62d54a0e287fa314b05c612671f (patch)
tree2c420b0f821de24032985af51ba081a4e617b6a5 /.github/workflows/release.yaml
parent69d3df5f945adc4f7ab5d1198167a1dbc8412fc9 (diff)
Prep: republish features to ghcr.io (#78)
* syncing action * modify release.yaml * version update ; remove "install" * add 'latest' * add workflow condition
Diffstat (limited to '.github/workflows/release.yaml')
-rw-r--r--.github/workflows/release.yaml28
1 files changed, 13 insertions, 15 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 0b33120..07cd0d7 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -1,29 +1,27 @@
name: "(Release) Release dev container features (v2)"
on:
- push:
- tags:
- - "v*"
workflow_dispatch:
jobs:
deploy:
+ if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Generate tgz
+ - name: Install Oras
+ run: |
+ curl -LO https://github.com/oras-project/oras/releases/download/v0.13.0/oras_0.13.0_linux_amd64.tar.gz
+ mkdir -p oras-install/
+ tar -zxf oras_0.13.0_*.tar.gz -C oras-install/
+ mv oras-install/oras /usr/local/bin/
+ rm -rf oras_0.13.0_*.tar.gz oras-install/
+
+ - name: "Publish features to OCI"
uses: ./.github/devcontainers-action # TODO: Once 'devcontainers/action' is published, use that.
with:
publish-features: "true"
+ publish-to-oci: "true"
base-path-to-features: "./src"
-
- - name: Remove temporary devcontainer-cli # TODO: Temporary
- run: rm -rf ./devcontainer-cli-0*
-
- - name: Get or Create Release at current tag
- uses: ncipollo/release-action@v1
- with:
- allowUpdates: true # Lets us upload our own artifact from previous step
- artifactErrorsFailBuild: true
- artifacts: "./*.tgz,devcontainer-collection.json"
- token: ${{ secrets.GITHUB_TOKEN }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}