From 1fa0821057f51537bc2d8630259ea1b6ade57556 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Thu, 17 Feb 2022 04:36:26 +0000 Subject: [PATCH] changed container build pipeline to release --- .github/workflows/container.yml | 25 --------------- .github/workflows/release.yml | 55 +++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/container.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml deleted file mode 100644 index 338d167..0000000 --- a/.github/workflows/container.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Container -on: - push: - branches: - - master - tags: - - "*" -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Get current tag - id: get_current_tag - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - uses: mr-smithers-excellent/docker-build-push@v5 - name: Build & push Docker image - with: - registry: ghcr.io - username: ${{ secrets.GHCR_USER }} - password: ${{ secrets.GHCR_TOKEN }} - dockerfile: Dockerfile - image: k4yt3x/video2x - tags: latest, ${{ steps.get_current_tag.outputs.tag }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e9d4972 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,55 @@ +name: Release +on: + push: + branches: + - master + tags: + - "*" + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.get_tag.outputs.tag }} + steps: + - name: Get tag + id: get_tag + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + + create-release: + name: Create release + needs: + - setup + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ needs.setup.outputs.tag }} + release_name: Video2X ${{ needs.setup.outputs.tag }} + draft: true + prerelease: false + + container: + name: Build and upload container + needs: + - setup + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - uses: mr-smithers-excellent/docker-build-push@v5 + name: Build & push Docker image + with: + registry: ghcr.io + username: ${{ secrets.GHCR_USER }} + password: ${{ secrets.GHCR_TOKEN }} + dockerfile: Dockerfile + image: k4yt3x/video2x + tags: latest, ${{ needs.setup.outputs.tag }}