From 471c7f46cdd0ba9166a1605eafaf779d4da137c8 Mon Sep 17 00:00:00 2001 From: Luigi Cruz Date: Tue, 13 Oct 2020 03:17:51 -0300 Subject: [PATCH] Update image trigger. --- .github/workflows/release.yml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1f9667..f8154bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,6 @@ on: - push: - tags: - - 'v*' + release: + types: [ created ] name: Build & Deploy Image @@ -35,27 +34,17 @@ jobs: run: | chmod a+rw ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} echo ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.LONG_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.LONG_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ github.event.release.upload_url }} asset_path: ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} asset_name: ${{ steps.builder.outputs.filename }} - asset_content_type: application/x-tar + asset_content_type: application/x-tar - name: Delete Image id: delete_image run: | - rm ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }} \ No newline at end of file + rm ${{ env.working-directory }}/deploy/${{ steps.builder.outputs.filename }}