From 7580d5c662898ca14a4d7ef62139d18ae7579b31 Mon Sep 17 00:00:00 2001 From: Ilya Verbitskiy Date: Sat, 15 Jun 2024 12:14:38 +0200 Subject: [PATCH] gha: do nothing on deploy for now --- .github/workflows/deploy.yaml | 43 ----------------------------------- 1 file changed, 43 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b02bdf2..0080074 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -17,46 +17,3 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Login to GHCR - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Set version - run: | - # from refs/tags/v1.2.3 get 1.2.3 - VERSION=$(git describe --tags) - PLACEHOLDER='__version__ = "unknown"' - VERSION_FILE='minivirt/version.py' - # ensure the placeholder is there. If grep doesn't find the placeholder - # it exits with exit code 1 and github actions aborts the build. - grep "$PLACEHOLDER" "$VERSION_FILE" - sed -i "s/$PLACEHOLDER/__version__ = \"${VERSION}\"/g" "$VERSION_FILE" - - grep "version: 'git'" snap/snapcraft.yaml - sed -i "s/version: 'git'/version: ${VERSION}/g" snap/snapcraft.yaml - - name: Deploy image - run: | - IMAGE_VERSION=$(git describe --tags) - docker build -t restvirt:${IMAGE_VERSION} . - docker tag restvirt:${IMAGE_VERSION} ghcr.io/verbit/restvirt:${IMAGE_VERSION} - docker push ghcr.io/verbit/restvirt:${IMAGE_VERSION} - - name: Build Snap - uses: snapcore/action-build@v1 - id: snapcraft - - name: Determine Snap Channel - id: snap_channel - run: | - if (git describe --tags --exact-match); then - echo '::set-output name=SNAP_CHANNEL::stable' - else - echo '::set-output name=SNAP_CHANNEL::edge' - fi - - name: Deploy Snap - uses: snapcore/action-publish@v1 - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_CREDS }} - with: - snap: ${{ steps.snapcraft.outputs.snap }} - release: ${{ steps.snap_channel.outputs.SNAP_CHANNEL }}