diff --git a/.github/workflows/push_tag.yaml b/.github/workflows/push_tag.yaml new file mode 100644 index 0000000..37f630f --- /dev/null +++ b/.github/workflows/push_tag.yaml @@ -0,0 +1,29 @@ +name: Publish docker image on tag push +on: + push: + tags: + - '*' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: olegtarasov/get-tag@v2 + id: tagName + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: onepanel/core + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + tags: "${{ env.GIT_TAG_NAME }}" + - name: Set Slack Message + run: echo "::set-env name=SLACK_MESSAGE::Tag $GIT_TAG_NAME. Docker Tag onepanel/core:$GIT_TAG_NAME" + - name: Notify Slack Channels + uses: rtCamp/action-slack-notify@v2.0.0 + env: + SLACK_CHANNEL: dev + SLACK_ICON: https://avatars1.githubusercontent.com/u/30390575?s=48&v=4 + SLACK_TITLE: New Core Version + SLACK_USERNAME: opBot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}