diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 2a98843..6e35327 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -36,4 +36,21 @@ jobs: version: v0.129.0 args: release --rm-dist --release-footer /tmp/release.txt env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + docker-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # opspresso/action-docker use body of ./target/TAG_NAME as docker tag + # https://github.com/opspresso/action-docker#common-env + - run: mkdir ./target + - run: echo -n '${{ github.ref }}' | sed 's|refs/tags/||' > ./target/TAG_NAME + - name: Docker Build & Push to Docker Hub + uses: opspresso/action-docker@master + with: + args: --docker + env: + USERNAME: '${{ secrets.DOCKER_USER }}' + PASSWORD: '${{ secrets.DOCKER_TOKEN }}' + LATEST: 'false' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index cbd0521..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,23 +0,0 @@ -on: - release: - types: - - created - - published - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - # opspresso/action-docker use body of ./target/TAG_NAME as docker tag - # https://github.com/opspresso/action-docker#common-env - - run: mkdir ./target - - run: echo -n '${{ github.ref }}' | sed 's|refs/tags/||' > ./target/TAG_NAME - - name: Docker Build & Push to Docker Hub - uses: opspresso/action-docker@master - with: - args: --docker - env: - USERNAME: '${{ secrets.DOCKER_USER }}' - PASSWORD: '${{ secrets.DOCKER_TOKEN }}' - LATEST: 'false'