diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 46316ee..af44319 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,24 +12,25 @@ jobs: - uses: actions/checkout@v2.3.3 - - name: extract tag - id: vars - run: echo ::set-output name=nginx_version::$(grep '^FROM nginx' Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) + uses: go-semantic-release/action@v1 + id: version + with: + github-token: ${{ secrets.GITHUB_TOKEN }} - - run: echo "Pushing version ${{ steps.vars.outputs.nginx_version }}" + run: echo "Pushing version ${{ steps.version.outputs.version }}" - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@2.22 with: registry: ghcr.io - name: "ghcr.io/ironpeakservices/iron-nginx:${{ steps.vars.outputs.nginx_version }}" + name: "ghcr.io/ironpeakservices/iron-nginx:${{ steps.version.outputs.version }}" username: hazcod password: ${{ secrets.PACKAGE_TOKEN }} - name: Create GitHub release uses: actions/create-release@v1.1.4 with: - tag_name: ${{ steps.vars.outputs.nginx_version }} + tag_name: ${{ steps.version.outputs.version }} release_name: iron-nginx draft: false prerelease: false