From d47951d94d9ceee5e1547c64493bf2c0e4b794da Mon Sep 17 00:00:00 2001 From: phuong Date: Wed, 11 Aug 2021 14:31:21 +0700 Subject: [PATCH] Update GHA for release --- .github/workflows/manual-release.yml | 14 +++++++++++--- .github/workflows/on-release.yml | 28 ---------------------------- 2 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/on-release.yml diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 97e1d6e4..93db0f5f 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -5,7 +5,7 @@ on: inputs: tag_name: required: true - description: tag name for the release + description: tag name for the release, ex v1.2.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -29,8 +29,16 @@ jobs: - name: make new release uses: softprops/action-gh-release@v0.1.7 with: - token: ${{ env.GITHUB_TOKEN }} tag_name: ${{env.TAG_NAME}} - body: "#release-by-ci for v${{env.TAG_NAME}}" + body: "#release-by-ci for ${{env.TAG_NAME}}" draft: false prerelease: false + + - uses: elgohr/Publish-Docker-Github-Action@master + with: + dockerfile: Dockerfile + tags: "latest,${{env.TAG_NAME}}" + registry: docker.pkg.github.com + name: ${{env.REPOSITORY_NAME}}/webapp-aws + username: ${{github.actor}} + password: ${{env.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml deleted file mode 100644 index 6cd2d088..00000000 --- a/.github/workflows/on-release.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: on-release - -on: - release: - types: [ published ] - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - build-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - fetch-depth: 50 - - - uses: olegtarasov/get-tag@v2 - - - uses: elgohr/Publish-Docker-Github-Action@master - with: - dockerfile: Dockerfile - tags: "latest,${{env.GIT_TAG_NAME}}" - registry: docker.pkg.github.com - name: ${{env.REPOSITORY_NAME}}/webapp-aws - username: ${{github.actor}} - password: ${{env.GITHUB_TOKEN}}