From 542963cf04cbe62d54a0e287fa314b05c612671f Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Fri, 5 Aug 2022 12:22:30 -0700 Subject: Prep: republish features to ghcr.io (#78) * syncing action * modify release.yaml * version update ; remove "install" * add 'latest' * add workflow condition --- .github/workflows/release.yaml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to '.github/workflows') 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 }} -- cgit v1.2.3