name: Nginx Mega Build run-name: Nginx Build on: push: tags: - nginx-* jobs: build_nginx: runs-on: [ubuntu-latest] steps: - name: Checkout repository uses: actions/checkout@v3 - name: Set up environment variables run: | TAG_NAME=${GITHUB_REF##*/} NGINX_TAG=${TAG_NAME#nginx-} echo "NGINX_TAG=${NGINX_TAG}" >> $GITHUB_ENV echo "NGINX_TAG=${NGINX_TAG}" - name: Run Nginx Build run: | echo "This Task will be run using the following tag: ${NGINX_TAG}" curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh | bash -s -- --nginx-tag=${NGINX_TAG} -nl -nm tar czvf nginx-${NGINX_TAG}.tar.gz ~/nginx_scriptbox/nginx/objs - name: Release uses: softprops/action-gh-release@v2 token: ${{ secrets.DEPLOYMENT_TOKEN }} if: startsWith(github.ref, 'refs/tags/') with: files: nginx-*.tar.gz